VC 怎样用代码实现鼠标右击状态栏显示菜单
现在的代码如下,是用鼠标实现的
LRESULT CAgentDlg::OnTaskIconNotify(WPARAM wParam, LPARAM lParam)
{
POINT point;
if (wParam == TASKICONNOTIFYID)
{
switch(lParam)
{
case WM_RBUTTONUP:
::GetCursorPos(&point);
::SetForegroundWindow(GetSafeHwnd());
//状態設定
popupMenu->EnableMenuItem(ID_CONNECT, commo.isconnect() ? MF_GRAYED : MF_ENABLED);