Skip to content

Commit

Permalink
FileOpenDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
xland committed Jun 20, 2024
1 parent 4c3eb71 commit 966997f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,8 @@ void App::SaveFile() {
win->Save(filePathStr);
return;
}
IFileOpenDialog* dialog;
CLSID param1{ CLSID_FileSaveDialog }, param2{ IID_IFileSaveDialog };
auto hr = CoCreateInstance(param1, NULL, CLSCTX_ALL, param2, reinterpret_cast<void**>(&dialog));
IFileSaveDialog* dialog;
auto hr = CoCreateInstance(CLSID_FileSaveDialog, NULL, CLSCTX_ALL, IID_PPV_ARGS(&dialog));
if (FAILED(hr))
{
MessageBox(NULL, L"Failed to create COM FileSaveDialog object.", L"Error", MB_OK | MB_ICONERROR);
Expand Down

0 comments on commit 966997f

Please sign in to comment.