[PATCH 2/2] comctl32/toolbar: skip iString field for separators
Giuseppe Bilotta
giuseppe.bilotta at gmail.com
Wed Apr 22 17:57:16 CDT 2009
Some programs (e.g. Graphmatica 2.0f) forget to initialize the iString
field for separators in toolbars. Windows copes with this smoothly,
ignoring the field altogether. Do the same in Wine.
---
dlls/comctl32/toolbar.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c
index c3add77..83098cc 100644
--- a/dlls/comctl32/toolbar.c
+++ b/dlls/comctl32/toolbar.c
@@ -1841,7 +1841,9 @@ TOOLBAR_InternalInsertButtonsT(TOOLBAR_INFO *infoPtr, INT iIndex, UINT nAddButto
btnPtr->fsState = lpTbb[iButton].fsState;
btnPtr->fsStyle = lpTbb[iButton].fsStyle;
btnPtr->dwData = lpTbb[iButton].dwData;
- if(HIWORD(lpTbb[iButton].iString) && lpTbb[iButton].iString != -1)
+ if(btnPtr->fsStyle & BTNS_SEP)
+ btnPtr->iString = -1;
+ else if(HIWORD(lpTbb[iButton].iString) && lpTbb[iButton].iString != -1)
{
if (fUnicode)
Str_SetPtrW((LPWSTR*)&btnPtr->iString, (LPWSTR)lpTbb[iButton].iString );
--
1.6.2.254.g84bde
More information about the wine-patches
mailing list