mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-05-21 14:46:20 +08:00
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user