static void kdsetdispmode(UINT8 mode) { HMENU hmenu; keydisp_setmode(mode); hmenu = np2class_gethmenu(kdispwin.hwnd); CheckMenuItem(hmenu, IDM_KDISPFM, ((mode == KEYDISP_MODEFM)?MF_CHECKED:MF_UNCHECKED)); CheckMenuItem(hmenu, IDM_KDISPMIDI, ((mode == KEYDISP_MODEMIDI)?MF_CHECKED:MF_UNCHECKED)); }
static void kdopenpopup(HWND hWnd, LPARAM lp) { HMENU hMenu; POINT pt; hMenu = CreatePopupMenu(); menu_addmenu(hMenu, 0, np2class_gethmenu(hWnd), FALSE); menu_addmenures(hMenu, -1, IDR_CLOSE, TRUE); pt.x = LOWORD(lp); pt.y = HIWORD(lp); ClientToScreen(hWnd, &pt); TrackPopupMenu(hMenu, TPM_LEFTALIGN, pt.x, pt.y, 0, hWnd, NULL); DestroyMenu(hMenu); }
static void kdopenpopup(HWND hWnd, LPARAM lp) { HMENU hMenu; POINT pt; hMenu = CreatePopupMenu(); menu_addmenubar(hMenu, np2class_gethmenu(hWnd)); AppendMenu(hMenu, MF_SEPARATOR, 0, NULL); AppendMenu(hMenu, MF_STRING, IDM_KDCLOSE, str_kdclose); pt.x = LOWORD(lp); pt.y = HIWORD(lp); ClientToScreen(hWnd, &pt); TrackPopupMenu(hMenu, TPM_LEFTALIGN, pt.x, pt.y, 0, hWnd, NULL); DestroyMenu(hMenu); }