CFileDialog initial directory

hi all,
I implement a CFileDialog, and I want it to be opened in a specific directory. hoe do I do it?
Who is Participating?
pau_serraConnect With a Mentor Commented:
Before u call DoModal(), set the variable member 'm_ofn.lpstrInitialDir'

CFileDialog of( TRUE, ".SHP", NULL, OFN_ENABLESIZING|OFN_ALLOWMULTISELECT, "Shape Files (*.shp)|*.shp|All Files (*.*)|*.*||", NULL );
of.m_ofn.lpstrInitialDir = "C:\\ESRI\\DATA\\";

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.