Skip to content

Commit

Permalink
Vutils
Browse files Browse the repository at this point in the history
  • Loading branch information
vic4key committed Oct 12, 2023
1 parent 3b73118 commit 382fc1e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Test/Sample.InputDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
DEF_SAMPLE(InputDialog)
{
vu::InputDialog dialog(L"How old are you?");
if (dialog.do_modal() == IDOK)
if (dialog.do_modal())
{
std::wcout << dialog.input().to_string() << std::endl;
}
Expand Down
2 changes: 1 addition & 1 deletion include/Vutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -2962,7 +2962,7 @@ class InputDialog : public WDTDialog
void label(const std::wstring& label);
VariantW& input();

INT_PTR do_modal();
bool do_modal();

static LRESULT CALLBACK DlgProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp);

Expand Down
4 changes: 2 additions & 2 deletions src/details/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,9 +482,9 @@ vu::VariantW& InputDialog::input()
return m_input;
}

INT_PTR InputDialog::do_modal()
bool InputDialog::do_modal()
{
return WDTDialog::do_modal(DLGPROC(DlgProc), this);
return WDTDialog::do_modal(DLGPROC(DlgProc), this) == IDOK;
}

LRESULT CALLBACK InputDialog::DlgProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
Expand Down

0 comments on commit 382fc1e

Please sign in to comment.