Re: CFileDialog: Newbie Help Needed!!
Still cant get it to work:
class CSampleDlg : public CFileDialog{
public:
CSampleDlg(BOOL bOpenFileDialog,
LPCTSTR lpszDefExt = NULL,
LPCTSTR lpszFileName = NULL,
DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
LPCTSTR lpszFilter = NULL,
CWnd* pParentWnd = NULL,
DWORD dwSize = 0,
BOOL bVistaStyle = 1){
}
public:
virtual void OnFileNameChange()override{
}
};
????
~Matt
"David Wilkinson" wrote:
Mateusz Rajca wrote:
Hi Thanks but I get an error when compiling this code:
class CSampleDlg : public CFileDialog{
public:
CSampleDlg(){
DoModal();
}
public:
virtual void OnFileNameChange()override{
MessageBox(TEXT("Selection Changed"), TEXT("1"), 0);
}
};
------------
The error is: 'CFileDialog' : no appropriate default constructor available
Mat:
You won't get a clearer error message than that. The CFileDialog
constructor needs parameters. Typically, you will give your derived
class the same parameters, and pass them on.
David Wilkinson