Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 385
  • Last Modified:

mfc mdi onfileopen

Although I have plenty of c++ experience, I'm new to mfc and don't know what I'm doing.

When the user clicks 'Open file...' the open file dialog pops up, the user can select a file and click ok. All standard stuff so far. I expect the dialog returns the address of the selected file somehow but I don't know how to find it. I tried adding a message handler for ID_FILE_OPEN in XDDT.cpp using the event handler wizard.

void CXDDTApp::OnFileOpen()
{
      AfxMessageBox("test");
      // TODO: Add your command handler code here
}

but it makes no difference.
0
as2003
Asked:
as2003
1 Solution
 
AlexFMCommented:
See CFileDialog Class and CFileDialog::GetPathName function.
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now