To specialize the CFileDialog
you usually derive from it, instead of making it a class member. Regardless of what you do, though, the solution is to initialize the CFileDialog
object through an initializer list. Your constructor would look like this:
FilesWorkFlow::FilesWorkFlow(void) :
dlgFile( true, 0, 0,
OFN_ENABLESIENABLESIZING | OFN_HIDEREADONLY,
_T("JPEG Files (*.jpg)|*.jpg|TIFF Files (*.tif)|*.tif|PNG Files (*.png)|*.png|Bitmap Files (*.bmp)|*.bmp||"),
0, 0, true )
{
}