How to Kill Dialog When InitDialog I Just simply return false when Initial Dialog ,But it Still Show On Screen How To Run this Application(base on Dialog) and Don't show this Dialog. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 hide dialog at startupvoid CHidedlgDlg::OnWindowPosChanging(WINDOWPOS FAR* lpwndpos) {if (lpwndpos->flags & SWP_SHOWWINDOW) { lpwndpos->flags &= ~SWP_SHOWWINDOW; PostMessage(WM_WINDOWPOSCHANGING, 0, (LPARAM)lpwndpos); ShowWindow(SW_HIDE); }else CDialog::OnWindowPosChanging(lpwndpos); } you can also override DoModel、RunModelLoop functions in OnInitDialog()this->SetWindowPos(NULL,0,0,0,0,SWP_SHOWWINDOW); BTW: It does not mean that the dialog will be invisible when OnInitDialog returns false. this->EndDialog( IDOK ) ;orthis->EndDialog( IDCANCEL ) ; CdialogBar内部布局问题 位图与调色板 100分高手请进 关于Cmutex和CCriticalsection! win32 api 咋学? 对VC开发全文检索有经验的进。高分奉送! 哪位高手可以给我一个操作文本文件的例子? COM调用最慢的地方在那里? 求:延长别的程序启动时间的程序 100分 在VC中怎样修改javascript的函数代码? 帮帮忙,带存档的套接字问题??? vc.net怎样调用C#做的WebService?帮帮忙,谢谢了!
void CHidedlgDlg::OnWindowPosChanging(WINDOWPOS FAR* lpwndpos)
{
if (lpwndpos->flags & SWP_SHOWWINDOW) {
lpwndpos->flags &= ~SWP_SHOWWINDOW;
PostMessage(WM_WINDOWPOSCHANGING, 0, (LPARAM)lpwndpos);
ShowWindow(SW_HIDE);
}
else
CDialog::OnWindowPosChanging(lpwndpos);
}
this->SetWindowPos(NULL,0,0,0,0,SWP_SHOWWINDOW);
or
this->EndDialog( IDCANCEL ) ;