by Andrea » Mar 15, 2003 @ 5:14pm
Thank you Damian, Sm!rk, ppcStudios and warmi !! It works !! Here is the code I used :
OPENFILENAME ofn;
TCHAR szFileName[MAXPATH] = TEXT("");
ZeroMemory(&ofn, sizeof(ofn));
ofn.lStructSize = sizeof(ofn);
//ofn.hwndOwner = hwnd;
ofn.lpstrFilter = TEXT("Executable Files (*.exe)\0*.exe\0All Files (*.*)\0*.*\0\0");
ofn.lpstrFile = szFileName;
ofn.nMaxFile = MAXPATH;
ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
ofn.lpstrDefExt = TEXT("exe");
if(GetOpenFileName(&ofn))
{
}
And using tGetFile from Tillanosoft make it even better !! (just replace GetOpenFileName by tGetOpenFileName)
Thanks again for solving my problem so quickly.
Andrea