- Don't keep track of the number of TB buttons.
- Call the W version of SetWindowLongPtr.
This commit is contained in:
parent
4e0f6a4501
commit
87ba2ef310
|
@ -45,7 +45,6 @@ typedef struct tagHHInfo
|
||||||
HH_WINTYPEW *pHHWinType;
|
HH_WINTYPEW *pHHWinType;
|
||||||
HINSTANCE hInstance;
|
HINSTANCE hInstance;
|
||||||
LPWSTR szCmdLine;
|
LPWSTR szCmdLine;
|
||||||
DWORD dwNumTBButtons;
|
|
||||||
HWND hwndTabCtrl;
|
HWND hwndTabCtrl;
|
||||||
HFONT hFont;
|
HFONT hFont;
|
||||||
} HHInfo;
|
} HHInfo;
|
||||||
|
@ -194,7 +193,6 @@ static BOOL HH_AddToolbar(HHInfo *pHHInfo)
|
||||||
toolbarFlags = HHWIN_BUTTON_EXPAND | HHWIN_BUTTON_BACK | HHWIN_BUTTON_STOP |
|
toolbarFlags = HHWIN_BUTTON_EXPAND | HHWIN_BUTTON_BACK | HHWIN_BUTTON_STOP |
|
||||||
HHWIN_BUTTON_REFRESH | HHWIN_BUTTON_HOME | HHWIN_BUTTON_PRINT;
|
HHWIN_BUTTON_REFRESH | HHWIN_BUTTON_HOME | HHWIN_BUTTON_PRINT;
|
||||||
TB_AddButtonsFromFlags(buttons, toolbarFlags, &dwNumButtons);
|
TB_AddButtonsFromFlags(buttons, toolbarFlags, &dwNumButtons);
|
||||||
pHHInfo->dwNumTBButtons = dwNumButtons;
|
|
||||||
|
|
||||||
dwStyles = WS_CHILDWINDOW | WS_VISIBLE | TBSTYLE_FLAT |
|
dwStyles = WS_CHILDWINDOW | WS_VISIBLE | TBSTYLE_FLAT |
|
||||||
TBSTYLE_WRAPABLE | TBSTYLE_TOOLTIPS | CCS_NODIVIDER;
|
TBSTYLE_WRAPABLE | TBSTYLE_TOOLTIPS | CCS_NODIVIDER;
|
||||||
|
@ -338,7 +336,7 @@ static BOOL HH_AddHTMLPane(HHInfo *pHHInfo)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/* store the pointer to the HH info struct */
|
/* store the pointer to the HH info struct */
|
||||||
SetWindowLongPtrA(hWnd, GWLP_USERDATA, (LONG_PTR)pHHInfo);
|
SetWindowLongPtrW(hWnd, GWLP_USERDATA, (LONG_PTR)pHHInfo);
|
||||||
|
|
||||||
ShowWindow(hWnd, SW_SHOW);
|
ShowWindow(hWnd, SW_SHOW);
|
||||||
UpdateWindow(hWnd);
|
UpdateWindow(hWnd);
|
||||||
|
|
Loading…
Reference in New Issue