Misplaced Property Sheet buttons
Peter Åstrand
astrand at cendio.se
Mon Oct 29 03:32:31 CDT 2007
>On Fri, 26 Oct 2007, Frank Richter wrote:
>
>> On 26.10.2007 16:52, Peter Åstrand wrote:
>> This solves the position problem, but instead the Help button disappears.
>> See screenshot
>> http://www.cendio.com/~astrand/wine/62-tab-size/patched.png. Any ideas?
>
>Hint: check again what WM_WINDOWPOSCHANGED's 'lParam' contains ...
Thanks. I've now fixed this problem. I discovered another bug, though: The
implementation does not take into account that the caller might do
ShowWindow(FALSE) on the help and apply buttons. The patch below fixes
this problem as well. I will file a bug.
--- propsheet.c (revision 13243)
+++ propsheet.c (arbetskopia)
@@ -865,10 +865,12 @@
int buttonWidth, buttonHeight;
PADDING_INFO padding = PROPSHEET_GetPaddingInfo(hwndParent);
- if (psInfo->hasApply)
+ hwndButton = GetDlgItem(hwndParent, IDC_APPLY_BUTTON);
+ if (psInfo->hasApply && GetWindowLongW(hwndButton, GWL_STYLE) & WS_VISIBLE)
num_buttons++;
- if (psInfo->hasHelp)
+ hwndButton = GetDlgItem(hwndParent, IDHELP);
+ if (psInfo->hasHelp && GetWindowLongW(hwndButton, GWL_STYLE) & WS_VISIBLE)
num_buttons++;
/*
@@ -3828,6 +3830,17 @@
return TRUE;
}
+ case WM_WINDOWPOSCHANGED:
+ {
+ PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd, PropSheetInfoStr);
+
+ if (!psInfo)
+ return FALSE;
+
+ PROPSHEET_AdjustButtons(hwnd, psInfo);
+ return FALSE;
+ }
+
default:
return FALSE;
}
Regards,
---
Peter Åstrand ThinLinc Chief Developer
Cendio AB http://www.cendio.se
Wallenbergs gata 4
583 30 Linköping Phone: +46-13-21 46 00
ThinLinc User Group 2007 Höstkonferens --- 15-16 november, Linköping.
Program och anmälan: http://www.thinlincusergroup.se/aktiviteter
More information about the wine-devel
mailing list