菜单为什么没弹出呢?
如下代码所示
void CMainFrame::test(WPARAM p1, LPARAM p2)
{
if(p2==WM_RBUTTONDOWN){
CPoint point;
ClientToScreen(&point);
CMenu menu;
menu.LoadMenu(IDR_MENU1);
SetForegroundWindow();
menu.GetSubMenu(0)->TrackPopupMenu(TPM_RIGHTALIGN,point.x,point.y,this,NULL);
}
if(p2==WM_LBUTTONDBLCLK){
AfxMessageBox("OK");
}
}
与状态栏图标关联,为什么双击时弹出了OK右键却没弹出菜单呢?