winhlp32: Get rid of the shadow window, it's ugly and causes z-order issues.

This commit is contained in:
Alexandre Julliard 2010-05-22 11:24:03 +02:00
parent 821cd38e17
commit 84412cb0f5
3 changed files with 1 additions and 33 deletions

View File

@ -22,7 +22,6 @@
const char MAIN_WIN_CLASS_NAME[] = "MS_WINHELP"; const char MAIN_WIN_CLASS_NAME[] = "MS_WINHELP";
const char BUTTON_BOX_WIN_CLASS_NAME[] = "WHButtonBox"; const char BUTTON_BOX_WIN_CLASS_NAME[] = "WHButtonBox";
const char SHADOW_WIN_CLASS_NAME[] = "WHShadow";
const char HISTORY_WIN_CLASS_NAME[] = "WHHistory"; const char HISTORY_WIN_CLASS_NAME[] = "WHHistory";
const char STRING_BUTTON[] = "BUTTON"; const char STRING_BUTTON[] = "BUTTON";

View File

@ -570,7 +570,6 @@ static void WINHELP_DeleteWindow(WINHELP_WINDOW* win)
WINHELP_DeleteButtons(win); WINHELP_DeleteButtons(win);
if (win->page) WINHELP_DeletePageLinks(win->page); if (win->page) WINHELP_DeletePageLinks(win->page);
if (win->hShadowWnd) DestroyWindow(win->hShadowWnd);
if (win->hHistoryWnd) DestroyWindow(win->hHistoryWnd); if (win->hHistoryWnd) DestroyWindow(win->hHistoryWnd);
DeleteObject(win->hBrush); DeleteObject(win->hBrush);
@ -843,7 +842,6 @@ BOOL WINHELP_CreateHelpWindow(WINHELP_WNDPAGE* wpage, int nCmdShow, BOOL remembe
if (bPopup) if (bPopup)
{ {
DWORD mask = SendMessage(hTextWnd, EM_GETEVENTMASK, 0, 0); DWORD mask = SendMessage(hTextWnd, EM_GETEVENTMASK, 0, 0);
RECT rect;
win->font_scale = Globals.active_win->font_scale; win->font_scale = Globals.active_win->font_scale;
WINHELP_SetupText(hTextWnd, win, wpage->relative); WINHELP_SetupText(hTextWnd, win, wpage->relative);
@ -853,17 +851,6 @@ BOOL WINHELP_CreateHelpWindow(WINHELP_WNDPAGE* wpage, int nCmdShow, BOOL remembe
SendMessage(hTextWnd, EM_SETEVENTMASK, 0, mask | ENM_REQUESTRESIZE); SendMessage(hTextWnd, EM_SETEVENTMASK, 0, mask | ENM_REQUESTRESIZE);
SendMessage(hTextWnd, EM_REQUESTRESIZE, 0, 0); SendMessage(hTextWnd, EM_REQUESTRESIZE, 0, 0);
SendMessage(hTextWnd, EM_SETEVENTMASK, 0, mask); SendMessage(hTextWnd, EM_SETEVENTMASK, 0, mask);
GetWindowRect(win->hMainWnd, &rect);
win->hShadowWnd = CreateWindowEx(WS_EX_TOOLWINDOW, SHADOW_WIN_CLASS_NAME,
"", WS_POPUP | WS_VISIBLE,
rect.left + SHADOW_DX, rect.top + SHADOW_DY,
rect.right - rect.left,
rect.bottom - rect.top,
Globals.active_win->hMainWnd, 0,
Globals.hInstance, NULL);
SetWindowPos(win->hMainWnd, win->hShadowWnd, 0, 0, 0, 0,
SWP_NOSIZE | SWP_NOMOVE);
} }
else else
{ {
@ -1198,16 +1185,6 @@ static LRESULT CALLBACK WINHELP_HistoryWndProc(HWND hWnd, UINT msg, WPARAM wPara
return DefWindowProc(hWnd, msg, wParam, lParam); return DefWindowProc(hWnd, msg, wParam, lParam);
} }
/***********************************************************************
*
* WINHELP_ShadowWndProc
*/
static LRESULT CALLBACK WINHELP_ShadowWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
if (WINHELP_CheckPopup(hWnd, msg, wParam, lParam, NULL)) return 0;
return WINHELP_CheckPopup(hWnd, msg, wParam, lParam, NULL) ? 0L : DefWindowProc(hWnd, msg, wParam, lParam);
}
/************************************************************************** /**************************************************************************
* cb_KWBTree * cb_KWBTree
* *
@ -1629,7 +1606,7 @@ BOOL WINHELP_CreateIndexWindow(BOOL is_search)
*/ */
static BOOL WINHELP_RegisterWinClasses(void) static BOOL WINHELP_RegisterWinClasses(void)
{ {
WNDCLASSEX class_main, class_button_box, class_shadow, class_history; WNDCLASSEX class_main, class_button_box, class_history;
class_main.cbSize = sizeof(class_main); class_main.cbSize = sizeof(class_main);
class_main.style = CS_HREDRAW | CS_VREDRAW; class_main.style = CS_HREDRAW | CS_VREDRAW;
@ -1652,19 +1629,12 @@ static BOOL WINHELP_RegisterWinClasses(void)
class_button_box.hbrBackground = (HBRUSH)(COLOR_BTNFACE+1); class_button_box.hbrBackground = (HBRUSH)(COLOR_BTNFACE+1);
class_button_box.lpszClassName = BUTTON_BOX_WIN_CLASS_NAME; class_button_box.lpszClassName = BUTTON_BOX_WIN_CLASS_NAME;
class_shadow = class_main;
class_shadow.lpfnWndProc = WINHELP_ShadowWndProc;
class_shadow.cbWndExtra = 0;
class_shadow.hbrBackground = (HBRUSH)(COLOR_3DDKSHADOW+1);
class_shadow.lpszClassName = SHADOW_WIN_CLASS_NAME;
class_history = class_main; class_history = class_main;
class_history.lpfnWndProc = WINHELP_HistoryWndProc; class_history.lpfnWndProc = WINHELP_HistoryWndProc;
class_history.lpszClassName = HISTORY_WIN_CLASS_NAME; class_history.lpszClassName = HISTORY_WIN_CLASS_NAME;
return (RegisterClassEx(&class_main) && return (RegisterClassEx(&class_main) &&
RegisterClassEx(&class_button_box) && RegisterClassEx(&class_button_box) &&
RegisterClassEx(&class_shadow) &&
RegisterClassEx(&class_history)); RegisterClassEx(&class_history));
} }

View File

@ -76,7 +76,6 @@ typedef struct tagWinHelp
HLPFILE_PAGE* page; HLPFILE_PAGE* page;
HWND hMainWnd; HWND hMainWnd;
HWND hShadowWnd;
HWND hHistoryWnd; HWND hHistoryWnd;
WNDPROC origRicheditWndProc; WNDPROC origRicheditWndProc;