CFileDialog and Vista + Win7 problem!
-
Hello community, i make my own CFileDialogEx derived from CFileDialog, with some new controls on it, but if i run my program on vista or win7, this new controls are not visible, mean, it is the standard Vista File dialog showed, but not my own! How to solve this, so that my CFileDialogEx is showed?? The constructor of my file dialog is called, but newer this OnInitDialog() of my custom file dialog!! :( In the MSDN says that there is a new parameter BOOL bVistaStyle and i set them to FALSE, but i see again the vista standard CFileDialog, not my own!! :( Does any one have a idea how to solve this, so i can use my custom CFileDialogEx(derived from CFileDialog)!? I hope its understandably what i have wrote :( In XP is all there, my complete CFileDialogEx! thanks for any help! Arrin
-
Hello community, i make my own CFileDialogEx derived from CFileDialog, with some new controls on it, but if i run my program on vista or win7, this new controls are not visible, mean, it is the standard Vista File dialog showed, but not my own! How to solve this, so that my CFileDialogEx is showed?? The constructor of my file dialog is called, but newer this OnInitDialog() of my custom file dialog!! :( In the MSDN says that there is a new parameter BOOL bVistaStyle and i set them to FALSE, but i see again the vista standard CFileDialog, not my own!! :( Does any one have a idea how to solve this, so i can use my custom CFileDialogEx(derived from CFileDialog)!? I hope its understandably what i have wrote :( In XP is all there, my complete CFileDialogEx! thanks for any help! Arrin
I've used CFileDialog with extra UI (extra dialog) attached to it, and had to use the new
bVistaStyle
flag to make it work on Vista; the constructor gets called, as well as the OnInitDialog.class MyFileDialog: public CFileDialog
{
//...
DECLARE_DYNAMIC(MyFileDialog)
//...
};MyFileDialog::MyFileDialog(LPCTSTR lpszFilter , LPCTSTR lpszDefExt, LPCTSTR lpszFileName, CWnd* pParentWnd) :
CFileDialog(TRUE, lpszDefExt, lpszFileName,
OFN_ALLOWMULTISELECT | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_SHOWHELP | OFN_EXPLORER | OFN_ENABLETEMPLATE , lpszFilter, pParentWnd, 0,FALSE
)
{
//...
//add custom controls in CFileDialog
SetTemplate(0,IDD_MYCUSTOM_DIALOG);
//...
}I don't think we do any other initializations for the application. Can you try it with a simple barebone project ? good luck. Max.
This signature was proudly tested on animals.
-
I've used CFileDialog with extra UI (extra dialog) attached to it, and had to use the new
bVistaStyle
flag to make it work on Vista; the constructor gets called, as well as the OnInitDialog.class MyFileDialog: public CFileDialog
{
//...
DECLARE_DYNAMIC(MyFileDialog)
//...
};MyFileDialog::MyFileDialog(LPCTSTR lpszFilter , LPCTSTR lpszDefExt, LPCTSTR lpszFileName, CWnd* pParentWnd) :
CFileDialog(TRUE, lpszDefExt, lpszFileName,
OFN_ALLOWMULTISELECT | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_SHOWHELP | OFN_EXPLORER | OFN_ENABLETEMPLATE , lpszFilter, pParentWnd, 0,FALSE
)
{
//...
//add custom controls in CFileDialog
SetTemplate(0,IDD_MYCUSTOM_DIALOG);
//...
}I don't think we do any other initializations for the application. Can you try it with a simple barebone project ? good luck. Max.
This signature was proudly tested on animals.
Hi, thanx for answer, and i have a own dialog with controls that i show bottom of this standard CFileDialog controls, bottom of combobox of file types. And the constructor gets called too, but not the OnInitDialog() of my custom dialog(its a modeless dialog as parent), i work on XP system! I try with SetTemplate()! regards Arrin
-
Hi, thanx for answer, and i have a own dialog with controls that i show bottom of this standard CFileDialog controls, bottom of combobox of file types. And the constructor gets called too, but not the OnInitDialog() of my custom dialog(its a modeless dialog as parent), i work on XP system! I try with SetTemplate()! regards Arrin