--- np2/win9x/menu.cpp 2004/02/11 17:39:59 1.11 +++ np2/win9x/menu.cpp 2007/12/17 14:52:54 1.30 @@ -7,101 +7,228 @@ #include "pccore.h" + #define MFCHECK(a) ((a)?MF_CHECKED:MF_UNCHECKED) -typedef struct { -const char *str; - int id; -} SMENUITEM; - -static const char smenu_toolwin[] = "&Tool Window"; -static const char smenu_keydisp[] = "&Key display"; -static const char smenu_center[] = "&Centering"; -static const char smenu_snap[] = "&Window Snap"; -static const char smenu_bg[] = "&Background"; -static const char smenu_bgsnd[] = "Background &Sound"; -static const char smenu_320x200[] = " 320x200"; -static const char smenu_480x300[] = " 480x300"; -static const char smenu_640x400[] = " 640x400"; -static const char smenu_800x500[] = " 800x500"; -static const char smenu_960x600[] = " 960x600"; -static const char smenu_1280x800[] = "1280x600"; - -static const char smenu_memdump[] = "&Memory Dump"; -static const char smenu_dbguty[] = "&Debug Utility"; -static const char menu_i286save[] = "&i286 save"; - -static const SMENUITEM smenuitem[] = { - {smenu_toolwin, IDM_TOOLWIN}, - {smenu_keydisp, IDM_KEYDISP}, - {NULL, 0}, - {smenu_center, IDM_SCREENCENTER}, - {smenu_snap, IDM_SNAPENABLE}, - {smenu_bg, IDM_BACKGROUND}, - {smenu_bgsnd, IDM_BGSOUND}, - {NULL, 0}, - {smenu_320x200, IDM_SCRNMUL4}, - {smenu_480x300, IDM_SCRNMUL6}, - {smenu_640x400, IDM_SCRNMUL8}, - {smenu_800x500, IDM_SCRNMUL10}, - {smenu_960x600, IDM_SCRNMUL12}, - {smenu_1280x800, IDM_SCRNMUL16}, - {NULL, 0}}; +static BOOL searchchildmenu(HMENU hMenu, UINT uID, + HMENU *phmenuRet, UINT *puPos) +{ + UINT nCount; + UINT i; + MENUITEMINFO mii; -void sysmenu_initialize(void) { + nCount = GetMenuItemCount(hMenu); + for (i=0; i