#define MSG_TRAY_HANDLER(uMouseEvent, func) /
if (uMsg == WM_TRAYICON && lParam == uMouseEvent) /
{ /
SetMsgHandled(TRUE); /
func(); /
lResult = 0; /
if(IsMsgHandled()) /
return TRUE; /
}
代码说明: uMouseEvent为托盘消息的鼠标事件, WM_TRAYICON为自定义的托盘消息, func为相应的消息处理器。
if (uMsg == WM_TRAYICON && lParam == uMouseEvent) /
{ /
SetMsgHandled(TRUE); /
func(); /
lResult = 0; /
if(IsMsgHandled()) /
return TRUE; /
}
代码说明: uMouseEvent为托盘消息的鼠标事件, WM_TRAYICON为自定义的托盘消息, func为相应的消息处理器。