MCPcopy Create free account
hub / github.com/HO-COOH/FastCopy / MoveAndResizeWindow

Function MoveAndResizeWindow

FastCopy/WindowHelper.cpp:27–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27void MoveAndResizeWindow(winrt::Microsoft::UI::Xaml::Window window, winrt::Windows::Graphics::RectInt32 windowRect)
28{
29 auto const dpi = GetDpiForWindow(GetHwnd(window));
30 windowRect.Width = ScaleForDpi(windowRect.Width, dpi);
31 windowRect.Height = ScaleForDpi(windowRect.Height, dpi);
32 GetAppWindow(window).MoveAndResize(windowRect);
33}
34
35void CenterWindow(winrt::Microsoft::UI::Xaml::Window window, winrt::Windows::Graphics::SizeInt32 size)
36{

Callers 1

CenterWindowFunction · 0.85

Calls 3

GetHwndFunction · 0.85
ScaleForDpiFunction · 0.85
GetAppWindowFunction · 0.85

Tested by

no test coverage detected