| 32 | } |
| 33 | |
| 34 | CFolderDialog::CFolderDialog(LPCTSTR lpszFolderName, DWORD dwFlags, CWnd* pParentWnd) |
| 35 | { |
| 36 | // Use the supplied initial folder if non-null. |
| 37 | if (lpszFolderName == NULL) |
| 38 | m_strInitialFolderName = _T(""); |
| 39 | else |
| 40 | m_strInitialFolderName = lpszFolderName; |
| 41 | |
| 42 | memset(&m_bi, '\0', sizeof(BROWSEINFO)); |
| 43 | |
| 44 | if (pParentWnd == NULL) |
| 45 | m_bi.hwndOwner = 0; |
| 46 | else |
| 47 | m_bi.hwndOwner = pParentWnd->GetSafeHwnd(); |
| 48 | |
| 49 | m_strTitleHolder = LocUtils::GetStringFromResources(IDS_SELECT_DIRECTORY).c_str(); |
| 50 | |
| 51 | // Fill in the rest of the structure |
| 52 | m_bi.pidlRoot = NULL; |
| 53 | m_bi.pszDisplayName = m_szDisplayName; |
| 54 | m_bi.lpszTitle = m_strTitleHolder; |
| 55 | m_bi.ulFlags = dwFlags | BIF_NEWDIALOGSTYLE; |
| 56 | m_bi.lpfn = BrowseDirectoryCallback; |
| 57 | m_bi.lParam = (LPARAM)this; |
| 58 | |
| 59 | } |
| 60 | |
| 61 | CFolderDialog::~CFolderDialog() |
| 62 | { |
nothing calls this directly
no outgoing calls
no test coverage detected