diff options
author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2015-03-24 00:55:09 +0000 |
---|---|---|
committer | Rozhuk Ivan <rozhuk.im@gmail.com> | 2015-03-24 00:55:09 +0000 |
commit | b2e1ec3eb79227ccea43e270d5ed1917cc0dcc53 (patch) | |
tree | daf3cd3ef42ada29a532713b53dff6c44b76e1ca /plugins/Scriver/src/utils.cpp | |
parent | ceb5a959c77bbfdb5f5054d6d694032aa323f674 (diff) |
* multiple WINE bug fixes over DeferWindowPos(), bug rep: https://bugs.winehq.org/show_bug.cgi?id=38275
git-svn-id: http://svn.miranda-ng.org/main/trunk@12488 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver/src/utils.cpp')
-rw-r--r-- | plugins/Scriver/src/utils.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/Scriver/src/utils.cpp b/plugins/Scriver/src/utils.cpp index 0ecbad553b..ec5c25b5e3 100644 --- a/plugins/Scriver/src/utils.cpp +++ b/plugins/Scriver/src/utils.cpp @@ -497,20 +497,25 @@ void SetToolTipRect(HWND hwndParent, HWND hwndTT, RECT* rect) HDWP ResizeToolbar(HWND hwnd, HDWP hdwp, int width, int vPos, int height, int cControls, const ToolbarButton * buttons, int controlVisibility)
{
+ HWND hCtrl;
int i;
int lPos = 0;
int rPos = width;
for (i = 0; i < cControls; i++) {
if (!buttons[i].alignment && (controlVisibility & (1 << i))) {
lPos += buttons[i].spacing;
- hdwp = DeferWindowPos(hdwp, GetDlgItem(hwnd, buttons[i].controlId), 0, lPos, vPos, buttons[i].width, height, SWP_NOZORDER);
+ hCtrl = GetDlgItem(hwnd, buttons[i].controlId);
+ if (NULL != hCtrl) /* Wine fix. */
+ hdwp = DeferWindowPos(hdwp, hCtrl, 0, lPos, vPos, buttons[i].width, height, SWP_NOZORDER);
lPos += buttons[i].width;
}
}
for (i = cControls - 1; i >= 0; i--) {
if (buttons[i].alignment && (controlVisibility & (1 << i))) {
rPos -= buttons[i].spacing + buttons[i].width;
- hdwp = DeferWindowPos(hdwp, GetDlgItem(hwnd, buttons[i].controlId), 0, rPos, vPos, buttons[i].width, height, SWP_NOZORDER);
+ hCtrl = GetDlgItem(hwnd, buttons[i].controlId);
+ if (NULL != hCtrl) /* Wine fix. */
+ hdwp = DeferWindowPos(hdwp, hCtrl, 0, rPos, vPos, buttons[i].width, height, SWP_NOZORDER);
}
}
return hdwp;
|