扩展后的CFileDialog中 在CFileDialog.DoModal()中 有这么一行代码到时程序异常
if (nResult)
ASSERT(pThreadState->m_pAlternateWndInit == NULL); // 这一句会导致异常
pThreadState->m_pAlternateWndInit = NULL;
// 解决方法
//这里处理notify 消息
BOOL NEAR CALLBACK HandleNotify(HWND hDlg, LPOFNOTIFY pofn)
{
switch (pofn->hdr.code)
{
case CDN_FILEOK: // 这个是按"打开"按钮触发的消息
// 加入这两句就可以了
_AFX_THREAD_STATE* pThreadState = AfxGetThreadState();
pThreadState-> m_pAlternateWndInit = NULL;
// 相关网址
http://www.qqgb.com/Program/VC/VCJQ/Program_169276.html
http://topic.youkuaiyun.com/u/20071211/11/11ceba69-76a8-4054-a317-7cf463e14ad5.html
http://www.qqgb.com/Program/VC/VCsystem/Program_254988_2.html