void CDlgOptSmart::OnTempBrowse() { CBrowseForFolder bf; bf.strTitle.LoadString(IDS_SELECTTEMP); m_temp.GetWindowText(bf.strStartupDir); if (bf.GetFolder(m_pOptions->m_szTemp)) m_temp.SetWindowText(m_pOptions->m_szTemp); }
void CRootDlg::OnBrowse() { CBrowseForFolder bf; bf.hWndOwner = this->m_hWnd; bf.strTitle = "Select a folder..."; CString init; m_CustomName.GetWindowText(init); if(init=="" &&m_Filename!=""){ char drive[_MAX_DRIVE]; char dir[_MAX_DIR]; _splitpath(LPCSTR(m_Filename), drive, dir, NULL, NULL); init.Format("%s%s", drive, dir); } bf.strStartupDir = init; if (bf.GetFolder(init)){ m_CustomName.SetWindowText(init); } SetState(); }