hhctrl.ocx: Clean up Help_WndProc.

This commit is contained in:
Jacek Caban 2007-02-28 03:51:59 +01:00 committed by Alexandre Julliard
parent 8e98ca4727
commit 803cf4f40c
1 changed files with 16 additions and 22 deletions

View File

@ -30,7 +30,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(htmlhelp);
static void Help_OnSize(HWND hWnd);
static LRESULT Help_OnSize(HWND hWnd);
/* Window type defaults */
@ -584,14 +584,14 @@ static BOOL HH_AddHTMLPane(HHInfo *pHHInfo)
/* Viewer Window */
static void Help_OnSize(HWND hWnd)
static LRESULT Help_OnSize(HWND hWnd)
{
HHInfo *pHHInfo = (HHInfo *)GetWindowLongPtrW(hWnd, GWLP_USERDATA);
DWORD dwSize;
RECT rc;
if (!pHHInfo)
return;
return 0;
NP_GetNavigationRect(pHHInfo, &rc);
SetWindowPos(pHHInfo->WinType.hwndNavigation, HWND_TOP, 0, 0,
@ -613,13 +613,12 @@ static void Help_OnSize(HWND hWnd)
/* Resize browser window taking the frame size into account */
dwSize = GetSystemMetrics(SM_CXFRAME);
ResizeWebBrowser(pHHInfo, rc.right - dwSize, rc.bottom - dwSize);
return 0;
}
static LRESULT CALLBACK Help_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
PAINTSTRUCT ps;
HDC hdc;
switch (message)
{
case WM_COMMAND:
@ -627,12 +626,7 @@ static LRESULT CALLBACK Help_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPA
TB_OnClick(hWnd, LOWORD(wParam));
break;
case WM_SIZE:
Help_OnSize(hWnd);
break;
case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
EndPaint(hWnd, &ps);
break;
return Help_OnSize(hWnd);
case WM_DESTROY:
PostQuitMessage(0);
break;