vczh
2022-07-03 13:17:04 -07:00
parent 53f83491c6
commit 48f894d5a0
+14 -5
View File
@@ -9199,11 +9199,20 @@ WindowsForm
void SetClientSize(NativeSize size)override
{
RECT required={0,0,(int)size.x.value,(int)size.y.value };
RECT bounds;
GetWindowRect(handle, &bounds);
DpiAwared_AdjustWindowRect(&required, handle, dpiX);
SetBounds(NativeRect(NativePoint(bounds.left, bounds.top), NativeSize(required.right-required.left, required.bottom-required.top)));
if (customFrameMode)
{
RECT bounds;
GetWindowRect(handle, &bounds);
SetBounds(NativeRect(NativePoint(bounds.left, bounds.top), size));
}
else
{
RECT required = { 0,0,(int)size.x.value,(int)size.y.value };
RECT bounds;
GetWindowRect(handle, &bounds);
DpiAwared_AdjustWindowRect(&required, handle, dpiX);
SetBounds(NativeRect(NativePoint(bounds.left, bounds.top), NativeSize(required.right - required.left, required.bottom - required.top)));
}
}
NativeRect GetClientBoundsInScreen()override