如何知道自己的程序在任务栏中被点击了,响应什么事件

我喝多了 2020-05-23 01:10:39
如题, 系统任务栏中, 鼠标点击了自己程序的图标, 有事件响应么, 怎么才能知道自己被点击了
...全文
399 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
zgl7903 2020-05-25
  • 打赏
  • 举报
回复
可以重载主窗口的WindowPorc, 把所有消息TRACE出来对比

schlafenhamster 2020-05-23
  • 打赏
  • 举报
回复
void CMyFileOpenDlg::OnActivateApp(BOOL bActive, HTASK hTask)
{
CDialog::OnActivateApp(bActive, hTask);

// TODO: Add your message handler code here
afxDump << bActive << "=OnActivateApp\n";
}

CWnd::OnActivateApp
afx_msg void OnActivateApp( BOOL bActive, HTASK hTask );

Parameters

bActive

Specifies whether the CWnd is being activated or deactivated. TRUE means the CWnd is being activated. FALSE means the CWnd is being deactivated.

hTask

Specifies a task handle. If bActive is TRUE, the handle identifies the task that owns the CWnd being deactivated. If bActive is FALSE, the handle identifies the task that owns the CWnd being activated.

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧