VC⼀MFC 对话框程序中的任务栏图标

2025-04-14 20:27:55
推荐回答(1个)
回答1:

给你的非模态对话框添加WM_INITDIALOG 消息响应函数 OnInitDialog()
例如,利用SetWindowLong给对话框设置 窗口扩展风格 WS_EX_APPWINDOW
BOOL CDlg::OnInitDialog()
{
CDialog::OnInitDialog();

// TODO: Add extra initialization here
SetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE, WS_EX_APPWINDOW);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}