Skip to content

Commit

Permalink
more vista-readiness
Browse files Browse the repository at this point in the history
  • Loading branch information
freedom7341 committed Oct 23, 2023
1 parent 2b32d3f commit bce106c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions progmgr/dialog.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,13 +388,16 @@ BOOL CALLBACK NewItemDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LPARAM l
// Check that all the applicable fields are filled out,
// and if not then set the focus to the offending field
if (!(bOKEnabled = GetDlgItemText(hWndDlg, IDD_NAME, (LPWSTR)&szBuffer, ARRAYSIZE(szBuffer))))
SendDlgItemMessage(hWndDlg, IDD_NAME, EM_TAKEFOCUS, 0, 0);
// SendDlgItemMessage(hWndDlg, IDD_NAME, EM_TAKEFOCUS, 0, 0);
SetFocus(GetDlgItem(hWndDlg, IDD_NAME));
if (!(bOKEnabled = GetDlgItemText(hWndDlg, IDD_PATH, (LPWSTR)&szPathBuffer, ARRAYSIZE(szPathBuffer))))
SendDlgItemMessage(hWndDlg, IDD_PATH, EM_TAKEFOCUS, 0, 0);
// SendDlgItemMessage(hWndDlg, IDD_PATH, EM_TAKEFOCUS, 0, 0);
SetFocus(GetDlgItem(hWndDlg, IDD_PATH));
if (bWorkPath)
{
if (!(bOKEnabled = GetDlgItemText(hWndDlg, IDD_WORKPATH, (LPWSTR)&szPathBuffer, ARRAYSIZE(szPathBuffer))))
SendDlgItemMessage(hWndDlg, IDD_WORKPATH, EM_TAKEFOCUS, 0, 0);
// SendDlgItemMessage(hWndDlg, IDD_WORKPATH, EM_TAKEFOCUS, 0, 0);
SetFocus(GetDlgItem(hWndDlg, IDD_WORKPATH));
}

// Enable or disable the OK button based on the information
Expand Down

0 comments on commit bce106c

Please sign in to comment.