我已经创建了它,但我希望在点击重新加载后显示一个消息框
我试过
#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;
}
但它没有显示消息框
答案 0 :(得分:0)
您在没有任何初始化的情况下声明WPARAM wParam;
,并立即检查内容是什么,结果未指定,因为wParam
将包含一些默认垃圾值。