Commit 19c6edd4 authored by Dylan Smith's avatar Dylan Smith Committed by Alexandre Julliard

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.
parent a8e58307
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment