TCHAR filePtrC[MAX_PATH]; bool openDialog() { OPENFILENAME tofn = { 0 }; tofn.lStructSize = sizeof ( tofn ); tofn.hwndOwner = NULL; tofn.lpstrFile = filePtrC; tofn.nMaxFile = MAX_PATH; tofn.lpstrFilter = L"All\0*.*\0Text\0*.TXT\0"; tofn.nFilterIndex = 1; tofn.lpstrFileTitle = NULL; tofn.nMaxFileTitle = 0; tofn.lpstrInitialDir=NULL; tofn.Flags = OFN_PATHMUSTEXIST|OFN_FILEMUSTEXIST; return (GetOpenFileName(&tofn) == TRUE); //Exception thrown here. }
Unicode
_T
L
Visual Studio 2019
Visual Studio
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)