|
-
July 27th, 2002, 12:05 AM
#1
File OPen Dialog
Hi Gurus
I am using following code for File Open Dialog.
OPENFILENAME ofn;
char szFile[1024]= "\0";
HANDLE hf;
ZeroMemory(&ofn, sizeof(OPENFILENAME));
ofn.lpstrTitle = dialogTitle;
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = GetForegroundWindow();
ofn.lpstrFile = szFile;
ofn.nMaxFile = sizeof(szFile);
ofn.lpstrFilter = fileType;
ofn.nFilterIndex = 1;
ofn.lpstrFileTitle = NULL;
ofn.lpstrInitialDir = defaultFolder;
ofn.nMaxFileTitle = 1;
ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;
if (GetOpenFileName(&ofn)==FALSE)
{
return 0;
}
hf = CreateFile(ofn.lpstrFile, GENERIC_READ,
0, (LPSECURITY_ATTRIBUTES) NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,
(HANDLE) NULL);
strcpy(FolderPathName,ofn.lpstrFile);
CloseHandle(hf);
my problem is CAN I SHOW MY OWN STRING ON THIS STANDARD DIALOG?.....as per my understanding you can only change the header of this dialog. but for my application i want to add one string on this dialog?.....
Plz reply to this post.... if possibel with code
Regards
nagesh
-
July 27th, 2002, 05:55 AM
#2
CAN I SHOW MY OWN STRING ON THIS STANDARD DIALOG?.....
What string? Do you want to add a custom static label to display some other information ? Or customize the way the file names are displayed ? Did you read the MSDN articles about Explorer-Style Custom Templates
Last edited by stober; July 27th, 2002 at 06:12 AM.
-
July 27th, 2002, 06:31 AM
#3
Custom Label on File Open Dailog
Hi Stober
Thanx for repling....well Sir i want to show custom static label to display some information on the dialog. Thats the main thing i want to do .....
Please Help me to sort out this problem............
Regards
Nagesh
-
July 28th, 2002, 01:38 AM
#4
As far as I know you cannot modify its dialog box directly, but you can create another dialog box that is appended to the bottom of theirs to extend its functionality. There is an example of doing that on the MSDN CD #1 that comes with the VC6 compiler. Look in the \examples directory.
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
|