嘿,我試圖C++ HMENU顯示消息框
我已經創造了它創造的notepad.exe一個MENY,但我想在刷新
點擊後顯示一個消息框我試圖
#define MSG (WM_APP + 101)
HWND hWnd = FindWindow(NULL,TEXT("untitled - Notepad"));
HMENU hCurrent = GetMenu(hWnd);
HMENU hNew = CreateMenu();
AppendMenu(hCurrent, MF_STRING | MF_POPUP, (unsigned int)hNew, TEXT("TheDragoN"));
AppendMenu(hNew, MF_STRING, MSG, TEXT("Reload"));
AppendMenu(hNew, MF_STRING, 200, TEXT("Credits"));
DrawMenuBar(hWnd);
WPARAM wParam;
switch(LOWORD(wParam))
{
case MSG:
MessageBox(hWnd, L"TSSAA", L"MessSDSageBox",MB_OK);
break;
}
但它沒有顯示消息框
這不能使用SetWindowsHookEx()。 –