Module: wine Branch: master Commit: 2b12e89d5e89229348cb13b49a45091e8236f37e URL: http://source.winehq.org/git/wine.git/?a=commit;h=2b12e89d5e89229348cb13b49a...
Author: Francois Gouget fgouget@free.fr Date: Thu Mar 31 12:44:21 2011 +0200
winhlp32: Implement MACRO_HelpOnTop() and thus the corresponding menu.
---
programs/winhlp32/macro.c | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/programs/winhlp32/macro.c b/programs/winhlp32/macro.c index 3151e0d..7f3328f 100644 --- a/programs/winhlp32/macro.c +++ b/programs/winhlp32/macro.c @@ -488,7 +488,29 @@ void CALLBACK MACRO_HelpOn(void)
void CALLBACK MACRO_HelpOnTop(void) { - WINE_FIXME("()\n"); + static BOOL on_top = FALSE; + WINHELP_WINDOW *win; + HWND main_wnd = NULL; + HMENU menu; + + for (win = Globals.win_list; win; win = win->next) + if (!lstrcmpi(win->info->name, "main")) + main_wnd = win->hMainWnd; + if (!main_wnd) + { + WINE_ERR("could not find the main window!\n"); + return; + } + menu = GetMenu(main_wnd); + + on_top = !on_top; + if (on_top) { + CheckMenuItem(menu, MNID_HELP_HELPTOP, MF_BYCOMMAND|MF_CHECKED); + SetWindowPos(main_wnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); + } else { + CheckMenuItem(menu, MNID_HELP_HELPTOP, MF_BYCOMMAND|MF_UNCHECKED); + SetWindowPos(main_wnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); + } }
void CALLBACK MACRO_History(void)