MFC Visual Studio 2017 Community Update 16..7.2 under Win 10 Home.
Code:
string_t strLoadNetFolder = GetResourceString(IDS_STRING139); // Name of folder
string_t strNetExt = GetResourceString(IDS_STRING140); // Name of file extension "net"
string_t strNetFile = string_t(_T(".")) + strNetExt; // ".net"
path defLoadNetPath = GetTargetFolderPath(true, strLoadNetFolder); // Full path
string_t strFilters(_T("Load Net Files ("));
strFilters += strNetExt + string_t(_T(" | *.")) + strNetExt + string_t(_T(")")); // net) | *.net || "));
// "Load Net File (net | *.net)
CFileDialog fileDlg(TRUE, strNetExt.c_str(), strNetFile.c_str(),
OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_NOCHANGEDIR | OFN_EXPLORER, strFilters.c_str(), this);
fileDlg.m_ofn.lpstrInitialDir = defLoadNetPath.native().c_str();
fileDlg.m_ofn.lpstrTitle = _T("Load Image As...");
if (fileDlg.DoModal() == IDOK)
{
It displays normal file load dialog, but instead of "Load Net Files *.net it shows "Load Net Files InetO *.net)) and some chinese or japanese tects in drop down submenu. The "Save" dialog with the same code works just fine.