mirror of
https://github.com/mirror/processhacker
synced 2026-06-08 16:03:24 +00:00
fixed process properties layout bug (occurs after maximizing then restoring)
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@3252 21ef857c-d57f-4fe0-8362-d861dc6d29cd
This commit is contained in:
@@ -280,7 +280,7 @@ BOOLEAN PhpInitializePropSheetLayoutStage1(
|
||||
|
||||
tabControlHandle = PropSheet_GetTabControl(hwnd);
|
||||
tabControlItem = PhAddLayoutItem(layoutManager, tabControlHandle,
|
||||
NULL, PH_ANCHOR_ALL);
|
||||
NULL, PH_ANCHOR_ALL | PH_LAYOUT_IMMEDIATE_RESIZE);
|
||||
tabPageItem = PhAddLayoutItem(layoutManager, tabControlHandle,
|
||||
NULL, PH_LAYOUT_TAB_CONTROL); // dummy item to fix multiline tab control
|
||||
|
||||
|
||||
@@ -828,12 +828,25 @@ VOID PhpLayoutItemLayout(
|
||||
PhConvertRect(&rect, &Item->LayoutParentItem->Rect);
|
||||
Item->Rect = rect;
|
||||
|
||||
Item->LayoutParentItem->DeferHandle = DeferWindowPos(
|
||||
Item->LayoutParentItem->DeferHandle, Item->Handle,
|
||||
NULL, rect.left, rect.top,
|
||||
rect.right - rect.left, rect.bottom - rect.top,
|
||||
SWP_NOACTIVATE | SWP_NOZORDER
|
||||
);
|
||||
if (!(Item->Anchor & PH_LAYOUT_IMMEDIATE_RESIZE))
|
||||
{
|
||||
Item->LayoutParentItem->DeferHandle = DeferWindowPos(
|
||||
Item->LayoutParentItem->DeferHandle, Item->Handle,
|
||||
NULL, rect.left, rect.top,
|
||||
rect.right - rect.left, rect.bottom - rect.top,
|
||||
SWP_NOACTIVATE | SWP_NOZORDER
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
// This is needed for tab controls, so that TabCtrl_AdjustRect will give us an up-to-date result.
|
||||
SetWindowPos(
|
||||
Item->Handle,
|
||||
NULL, rect.left, rect.top,
|
||||
rect.right - rect.left, rect.bottom - rect.top,
|
||||
SWP_NOACTIVATE | SWP_NOZORDER
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Item->LayoutNumber = Manager->LayoutNumber;
|
||||
|
||||
@@ -413,6 +413,7 @@ VOID PhImageListWrapperRemove(
|
||||
|
||||
#define PH_LAYOUT_FORCE_INVALIDATE 0x1000 // invalidate the control when it is resized
|
||||
#define PH_LAYOUT_TAB_CONTROL 0x2000 // this is a dummy item, a hack for the tab control
|
||||
#define PH_LAYOUT_IMMEDIATE_RESIZE 0x4000 // needed for the tab control hack
|
||||
|
||||
#define PH_LAYOUT_DUMMY_MASK (PH_LAYOUT_TAB_CONTROL) // determines which items don't get resized at all; just dummy
|
||||
|
||||
|
||||
Reference in New Issue
Block a user