i need some information on implementing a 'browse for file' dialog popup box... thanks! Kilo~
Printable View
i need some information on implementing a 'browse for file' dialog popup box... thanks! Kilo~
im getting starting withCode:void DoFileOpen(HWND hwnd)
{
OPENFILENAME ofn;
char szFileName[MAX_PATH] = "";
ZeroMemory(&ofn, sizeof(ofn));
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = hwnd;
ofn.lpstrFilter = "All Files (*.*)\0*.*\0";
ofn.lpstrFile = szFileName;
ofn.nMaxFile = MAX_PATH;
ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
ofn.lpstrDefExt = "txt";
if(GetOpenFileName(&ofn))
{
SetDlgItemText(hwnd, ID_EDITEN, ofn.lpstrInitialDir);
}
}
C:\Documents and Settings\---\Desktop\ddcrypt\ddcrypt.cpp(179) : error C2065: 'OPENFILENAME' : undeclared identifier
hhhheeelllpppp mmmeeeee
A quick search suggests that you have WIN32_LEAN_AND_MEAN defined. If so, get rid of it.