Go4Expert

Go4Expert (http://www.go4expert.com/)
-   MFC (http://www.go4expert.com/articles/mfc-tutorials/)
-   -   Providing a custom template for CFileDialog (http://www.go4expert.com/articles/providing-custom-template-cfiledialog-t1836/)

shabbir 8Nov2006 17:01

Providing a custom template for CFileDialog
 
1. Add a New class derived from CFileDialog

2. Add a dialog that will be the template to your File dialog.

3. Change the Style of the Dialog so that it does not have any border/Control Box and add the Clip Siblings property to checked.

4. Now in the constructor of your class OFN_ENABLETEMPLATE as a flag indicating that you will be using the custom template.

5. Now specify the template name in the m_ofn. m_ofn.lpTemplateName = MAKEINTRESOURCE(IDD_FILE_DIALOG);

Your template is repositioned and resized to fit the standard controls when the CFileDialog window is first created.

If you want precise positioning of the standard controls, you can place a static control with an ID of stc32 on your template to indicate where you want the standard controls (Folder Combo , File Chooser and some navigation buttons like back, up ...) to be placed.

elec.shabnam 5Mar2008 16:31

Re: Providing a custom template for CFileDialog
 
this is a real nice way of providing custom tempalate

aisha.ansari84 5Mar2008 16:57

Re: Providing a custom template for CFileDialog
 
Quote:

Originally Posted by elec.shabnam
this is a real nice way of providing custom tempalate

:iagree:

debleena_doll2002 5Mar2008 17:03

Re: Providing a custom template for CFileDialog
 
Nice shabbir!!!

parvez.yu 6Mar2008 14:43

Re: Providing a custom template for CFileDialog
 
nice


All times are GMT +5.5. The time now is 22:07.