GetOpenFileName() problem
-
Hi, I want OpenDlg with out using any MFC ( like CFileDlg etc) OPENFILENAME ofn; memset(&ofn, 0, sizeof(OPENFILENAME)); ofn.lStructSize = sizeof(OPENFILENAME); ofn.hwndOwner = hwnd; ofn.hInstance = AfxGetInstanceHandle(); ofn.lpstrFilter = NULL; ofn.lpstrCustomFilter = NULL ; ofn.nMaxCustFilter = 0 ; ofn.nFilterIndex = 0 ; ofn.lpstrFile = lpcszFile ; ofn.nMaxFile = MAX_PATH ; ofn.lpstrFileTitle = lpcszFileTitle ; ofn.nMaxFileTitle = MAX_PATH ; ofn.lpstrInitialDir = NULL ; ofn.lpstrTitle = NULL ; ofn.Flags = OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY ; ofn.nFileOffset = 0 ; ofn.nFileExtension = 0 ; ofn.lpstrDefExt = NULL ; ofn.lCustData = NULL ; ofn.lpfnHook = NULL ; if( !GetOpenFileName(&ofn) ) I did not the openDialog. can any body tell me where was the wrong? Thanks, -- Koteswara