[ros-dev] [ros-diffs] [mkupfer] 41733: Mikhail Denisenko <denisenkom AT gmail DOT com> - Add symbols to system menu by using marlett font. - See issue #4450 for details.
James Tabor
jimtabor.rosdev at gmail.com
Thu Jul 2 03:26:20 CEST 2009
Hi!
On Wed, Jul 1, 2009 at 5:10 PM, Ged<gedmurphy at gmail.com> wrote:
> Did you read this patch before committing it?
> Your last patch fixed tchar usage and then this next patch introduces new ones.
>
>
Looks okay, interesting way for setting up the system menu for kernel
space. Need to test this with every application in our test library to
make sure this all works!
> @@ -1103,8 +1167,30 @@
> NTSTATUS WINAPI
> User32LoadSysMenuTemplateForKernel(PVOID Arguments, ULONG ArgumentLength)
> {
> - LRESULT Result;
> - Result = (LRESULT)LoadMenuW(User32Instance, L"SYSMENU");
> + HMENU hmenu = LoadMenuW(User32Instance, L"SYSMENU");
> + LRESULT Result = (LRESULT)hmenu;
> +
> + // removing space for checkboxes from menu
> + MENUINFO menuinfo = {0};
> + menuinfo.cbSize = sizeof(menuinfo);
> + menuinfo.fMask = MIM_STYLE;
> + GetMenuInfo(hmenu, &menuinfo);
> + menuinfo.dwStyle |= MNS_NOCHECK;
> + SetMenuInfo(hmenu, &menuinfo);
> +
> + // adding bitmaps to menu items
> + MENUITEMINFOW info = {0};
> + info.cbSize = sizeof(info);
> + info.fMask |= MIIM_BITMAP;
> + info.hbmpItem = HBMMENU_POPUP_MINIMIZE;
> + SetMenuItemInfoW(hmenu, SC_MINIMIZE, FALSE, &info);
> + info.hbmpItem = HBMMENU_POPUP_RESTORE;
> + SetMenuItemInfoW(hmenu, SC_RESTORE, FALSE, &info);
> + info.hbmpItem = HBMMENU_POPUP_MAXIMIZE;
> + SetMenuItemInfoW(hmenu, SC_MAXIMIZE, FALSE, &info);
> + info.hbmpItem = HBMMENU_POPUP_CLOSE;
> + SetMenuItemInfoW(hmenu, SC_CLOSE, FALSE, &info);
> +
> return(ZwCallbackReturn(&Result, sizeof(LRESULT), STATUS_SUCCESS));
> }
>
More information about the Ros-dev
mailing list