|
-
Jan 28th, 2003, 03:57 PM
#1
Thread Starter
Frenzied Member
Open, Save dialog
How can i show the open, save, and color dialog?
I know to get the open i used
VB Code:
void OpenF(HWND hwnd,char *vFilen)
{
OPENFILENAME ofn;
char szFileName1[MAX_PATH] = "";
ZeroMemory(&ofn, sizeof(ofn));
ofn.lStructSize = sizeof(ofn); // SEE NOTE BELOW
ofn.hwndOwner = hwnd;
ofn.lpstrTitle = "Open";
ofn.lpstrFilter = "Ini File (*.ini)\0*.txt\0All Files (*.*)\0*.*\0";
ofn.lpstrFile = szFileName1;
ofn.nMaxFile = MAX_PATH;
ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
ofn.lpstrDefExt = "ini";
if(GetOpenFileName(&ofn))
{
vFilen = szFileName1;
// Do something usefull with the filename stored in szFileName1
}
}
But i get a cancel error. How do i do this so i can intercept the cancel error and how do i show the save and color alos thanks in advance
- JayWare
Live to love. Not to Hate
Im to busy to have a site. But I got one and still working on it.
http://dre3k.net/
-
Jan 29th, 2003, 11:57 AM
#2
Thread Starter
Frenzied Member
Is there a better dialog to use? And is there a site you can send me to ?
- JayWare
Live to love. Not to Hate
Im to busy to have a site. But I got one and still working on it.
http://dre3k.net/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|