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:
wj32
2010-06-30 12:11:47 +00:00
parent 4b4a08c935
commit e463be0ae5
3 changed files with 21 additions and 7 deletions
+1 -1
View File
@@ -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
+19 -6
View File
@@ -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;
+1
View File
@@ -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