Skip to content

Commit

Permalink
feat: WeaselSetup custom user dir by folder dialog, when custom_user_…
Browse files Browse the repository at this point in the history
…dir_radio_button is clicked
  • Loading branch information
fxliang committed Feb 21, 2024
1 parent 9168147 commit 04d2955
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions WeaselSetup/InstallOptionsDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ LRESULT InstallOptionsDialog::OnUseDefaultDir(WORD, WORD code, HWND, BOOL&) {
}

LRESULT InstallOptionsDialog::OnUseCustomDir(WORD, WORD code, HWND, BOOL&) {
CFolderDialog dlg;
CStringW text;
dir_.GetWindowTextW(text);
if(!text.IsEmpty())
dlg.SetInitialFolder(text, false);
if (dlg.DoModal() == IDOK)
dir_.SetWindowTextW(dlg.m_szFolderPath);
dir_.EnableWindow(TRUE);
dir_.SetFocus();
return 0;
Expand Down

0 comments on commit 04d2955

Please sign in to comment.