char szFilters[]=
        "MyType Files (*.*)|*.bmp|All Files (*.*)|*.*||";

    CFileDialog fileDialog (TRUE, "bmp", "*.bmp",
        OFN_FILEMUSTEXIST| OFN_HIDEREADONLY, szFilters, this);
    CString filePath = "";
    CString fileName = "";
    if( fileDialog.DoModal ()==IDOK )
    {
        filePath = fileDialog.GetPathName();    
        fileName = fileDialog.GetFileTitle ();
    }