Skip to content

Commit

Permalink
fix: focus
Browse files Browse the repository at this point in the history
  • Loading branch information
pedromagician committed May 6, 2022
1 parent dee98e5 commit 04f5402
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
Binary file modified Bin/InputBox.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion CommandLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ CommandLine::~CommandLine()

void CommandLine::Help()
{
wcout << _T("InputBox 0.5.4") << endl;
wcout << _T("InputBox 0.5.6") << endl;
wcout << _T(" InputBox for command line. Amiga Rulez!") << endl << endl;
wcout << _T("Usage:") << endl;
wcout << _T(" InputBox [options]") << endl << endl;
Expand Down
5 changes: 5 additions & 0 deletions InputBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,11 @@ LRESULT CALLBACK InputBox::WndProc(HWND _hWnd, UINT _message, WPARAM _wParam, LP
bool InputBox::GetString(wstring & _result)
{
mhWndParent = GetActiveWindow();
if (!mhWndParent)
mhWndParent = GetForegroundWindow();
if (!mhWndParent)
mhWndParent = GetDesktopWindow();

RECT rc;
GetWindowRect(mhWndParent, &rc);

Expand Down
Binary file modified project.rc
Binary file not shown.

0 comments on commit 04f5402

Please sign in to comment.