
Customized File Open Dialog
Short of nothing ... you have to put some work in here
This is the framework code:
void CWinApp::OnFileOpen()
{
ASSERT(m_pDocManager != NULL);
m_pDocManager->OnFileOpen();
Quote:
}
and
void CDocManager::OnFileOpen()
{
// prompt the user (with all document templates)
CString newName;
if (!DoPromptFileName(newName, AFX_IDS_OPENFILE,
OFN_HIDEREADONLY | OFN_FILEMUSTEXIST, TRUE, NULL))
return; // open cancelled
AfxGetApp()->OpenDocumentFile(newName);
// if returns NULL, the user has already been alerted
Quote:
}
From this you can see that the only real way to do it is to handle the
message ID_FILE_OPEN in your derived application class
( available from within class wizard ) and changing
ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
in your application's message map to
ON_COMMAND(ID_FILE_OPEN, CMyDerivedWinApp::OnFileOpen)