wordpad: Use smaller cbSize for REBARBANDINFOW for compatibility.

The cbSize field for the REBARBANDINFOW structure was previously set to
the sizeof(REBARBANDINFOW), however, new fields were added to this
structure for newer version of windows.  Testing in Windows XP (or with
comctl32.dll from Windows XP) I found this larger size was rejected
causing the rebar to not be displayed in wordpad.
oldstable
Dylan Smith 2009-08-14 22:23:21 -04:00 committed by Alexandre Julliard
parent a8e58307f9
commit 19c6edd497
2 changed files with 4 additions and 4 deletions

View File

@ -97,7 +97,7 @@ static void AddTextButton(HWND hRebarWnd, UINT string, UINT command, UINT id)
WS_VISIBLE | WS_CHILD, 5, 5, 100, 15,
hRebarWnd, ULongToHandle(command), hInstance, NULL);
rb.cbSize = sizeof(rb);
rb.cbSize = REBARBANDINFOW_V6_SIZE;
rb.fMask = RBBIM_SIZE | RBBIM_CHILDSIZE | RBBIM_STYLE | RBBIM_CHILD | RBBIM_IDEALSIZE | RBBIM_ID;
rb.fStyle = RBBS_NOGRIPPER | RBBS_VARIABLEHEIGHT;
rb.hwndChild = hButton;
@ -448,7 +448,7 @@ static void preview_bar_show(HWND hMainWnd, BOOL show)
WS_VISIBLE | WS_CHILD, 0, 0, 0, 0,
hReBar, NULL, NULL, NULL);
rb.cbSize = sizeof(rb);
rb.cbSize = REBARBANDINFOW_V6_SIZE;
rb.fMask = RBBIM_SIZE | RBBIM_CHILDSIZE | RBBIM_STYLE | RBBIM_CHILD | RBBIM_IDEALSIZE | RBBIM_ID;
rb.fStyle = RBBS_NOGRIPPER | RBBS_VARIABLEHEIGHT;
rb.hwndChild = hStatic;

View File

@ -644,7 +644,7 @@ static void set_toolbar_state(int bandId, BOOL show)
REBARBANDINFOW rbbinfo;
int index = SendMessageW(hwndReBar, RB_IDTOINDEX, BANDID_FONTLIST, 0);
rbbinfo.cbSize = sizeof(rbbinfo);
rbbinfo.cbSize = REBARBANDINFOW_V6_SIZE;
rbbinfo.fMask = RBBIM_STYLE;
SendMessageW(hwndReBar, RB_GETBANDINFO, index, (LPARAM)&rbbinfo);
@ -1795,7 +1795,7 @@ static LRESULT OnCreate( HWND hWnd )
SendMessageW(hToolBarWnd, TB_AUTOSIZE, 0, 0);
rbb.cbSize = sizeof(rbb);
rbb.cbSize = REBARBANDINFOW_V6_SIZE;
rbb.fMask = RBBIM_SIZE | RBBIM_CHILDSIZE | RBBIM_CHILD | RBBIM_STYLE | RBBIM_ID;
rbb.fStyle = RBBS_CHILDEDGE | RBBS_BREAK | RBBS_NOGRIPPER;
rbb.cx = 0;