Reposition filter controls on CFileDialog

161 Views Asked by At

I display a CFileDialog:

CFileDialog dlgImport(TRUE,
    _T(".XSL"), _T(""), OFN_ALLOWMULTISELECT | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY, strFilter, this);
ZeroMemory(pszFile, 32767 * sizeof(TCHAR));
dlgImport.m_ofn.lpstrFile = pszFile;
dlgImport.m_ofn.nMaxFile = 32767;
dlgImport.m_ofn.nFileOffset = 0;

if (dlgImport.DoModal() != IDOK)
{
    // User did not select any files so tidy up the memory
    delete[] pszFile;
    return;
}

It looks like this on Windows 10:

File Dialog - Filters

I might have asked this before, but I would prefer the filter box to be under the file name, just like in Visual Studio:

Visual Studio Filters

I am supporting:

  • WIndows 7
  • Windows 8
  • Windos 10

How can we acheive the same in MFC projects built with Visual Studio 2019?

0

There are 0 best solutions below