Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

666 lines
19 KiB

  1. #include "shellprv.h"
  2. #include "ids.h"
  3. #include "help.h"
  4. #include "ascstr.h"
  5. #include "ftdlg.h"
  6. #include "ftedit.h"
  7. #include "ftcmmn.h"
  8. #define ID_TIMER 2222
  9. const static DWORD cs_rgdwHelpIDsArray[] =
  10. { // Context Help IDs
  11. IDC_FT_EDIT_EXT_EDIT_TEXT, IDH_FCAB_FT_NE_FILEEXT,
  12. IDC_FT_EDIT_EXT_EDIT, IDH_FCAB_FT_NE_FILEEXT,
  13. IDC_FT_EDIT_PID_COMBO_TEXT, IDH_FCAB_FT_NE_FILETYPE,
  14. IDC_FT_EDIT_PID_COMBO, IDH_FCAB_FT_NE_FILETYPE,
  15. IDC_FT_EDIT_ADVANCED, IDH_FCAB_FT_NE_ADV_BUT,
  16. IDC_NO_HELP_1, NO_HELP,
  17. 0, 0
  18. };
  19. CFTEditDlg::CFTEditDlg(FTEDITPARAM* pftEditParam) :
  20. CFTDlg((ULONG_PTR)cs_rgdwHelpIDsArray), _pftEditParam(pftEditParam),
  21. _iLVSel(-1)
  22. {
  23. }
  24. CFTEditDlg::~CFTEditDlg()
  25. {
  26. }
  27. ///////////////////////////////////////////////////////////////////////////////
  28. // Logic specific to our problem
  29. LRESULT CFTEditDlg::OnInitDialog(WPARAM wParam, LPARAM lParam)
  30. {
  31. HRESULT hres = E_FAIL;
  32. if (_pftEditParam)
  33. {
  34. hres = _InitAssocStore();
  35. if (SUCCEEDED(hres))
  36. {
  37. _hHeapProgID = HeapCreate(0, 8 * 1024, 0);
  38. if (!_hHeapProgID)
  39. hres = E_OUTOFMEMORY;
  40. }
  41. if (SUCCEEDED(hres))
  42. SetDlgItemText(_hwnd, IDC_FT_EDIT_EXT_EDIT, TEXT(""));
  43. }
  44. if (FAILED(hres))
  45. EndDialog(_hwnd, -1);
  46. else
  47. Edit_LimitText(GetDlgItem(_hwnd, IDC_FT_EDIT_EXT_EDIT), MAX_EXT - 1);
  48. // Return TRUE so that system set focus
  49. return TRUE;
  50. }
  51. LRESULT CFTEditDlg::OnEdit(WORD wNotif)
  52. {
  53. if (_fAdvanced)
  54. {
  55. if (EN_CHANGE == wNotif)
  56. {
  57. if (_nTimer)
  58. {
  59. KillTimer(_hwnd, _nTimer);
  60. _nTimer = 0;
  61. }
  62. _nTimer = SetTimer(_hwnd, ID_TIMER, 400, NULL);
  63. }
  64. }
  65. return FALSE;
  66. }
  67. LRESULT CFTEditDlg::OnTimer(UINT nTimer)
  68. {
  69. // Kill the timer
  70. KillTimer(_hwnd, _nTimer);
  71. _nTimer = 0;
  72. _ProgIDComboHelper();
  73. return TRUE;
  74. }
  75. HRESULT CFTEditDlg::_ProgIDComboHelper()
  76. {
  77. TCHAR szExt[MAX_EXT];
  78. TCHAR szProgIDDescr[MAX_PROGIDDESCR];
  79. DWORD cchProgIDDescr = ARRAYSIZE(szProgIDDescr);
  80. HRESULT hres = E_FAIL;
  81. GetDlgItemText(_hwnd, IDC_FT_EDIT_EXT_EDIT, szExt, ARRAYSIZE(szExt));
  82. hres = _GetProgIDDescrFromExt(szExt, szProgIDDescr, &cchProgIDDescr);
  83. if (SUCCEEDED(hres))
  84. _SelectProgIDDescr(szProgIDDescr);
  85. return hres;
  86. }
  87. HRESULT CFTEditDlg::_GetProgIDDescrFromExt(LPTSTR pszExt, LPTSTR pszProgIDDescr,
  88. DWORD* pcchProgIDDescr)
  89. {
  90. IAssocInfo* pAI = NULL;
  91. HRESULT hres = _pAssocStore->GetAssocInfo(pszExt, AIINIT_EXT, &pAI);
  92. if (SUCCEEDED(hres))
  93. {
  94. hres = pAI->GetString(AISTR_PROGIDDESCR, pszProgIDDescr, pcchProgIDDescr);
  95. pAI->Release();
  96. }
  97. return hres;
  98. }
  99. LRESULT CFTEditDlg::OnAdvancedButton(WORD wNotif)
  100. {
  101. DECLAREWAITCURSOR;
  102. TCHAR szAdvBtnText[50];
  103. SetWaitCursor();
  104. _fAdvanced = !_fAdvanced;
  105. LoadString(g_hinst, _fAdvanced ? IDS_FT_ADVBTNTEXTEXPAND : IDS_FT_ADVBTNTEXTCOLLAPS,
  106. szAdvBtnText, ARRAYSIZE(szAdvBtnText));
  107. SetWindowText(GetDlgItem(_hwnd, IDC_FT_EDIT_ADVANCED), szAdvBtnText);
  108. _ConfigureDlg();
  109. UpdateWindow(_hwnd);
  110. if (_fAdvanced)
  111. {
  112. HWND hwndCombo = GetDlgItem(_hwnd, IDC_FT_EDIT_PID_COMBO);
  113. // Is the combobox filled yet?
  114. if (!ComboBox_GetCount(hwndCombo))
  115. {
  116. _FillProgIDDescrCombo();
  117. // Select the <New> item
  118. if (FAILED(_ProgIDComboHelper()))
  119. {
  120. TCHAR szNew[20];
  121. if (LoadString(g_hinst, IDS_FT_NEW, szNew, ARRAYSIZE(szNew)))
  122. {
  123. int iIndex = ComboBox_FindStringExact(hwndCombo, -1, szNew);
  124. if (CB_ERR != iIndex)
  125. ComboBox_SetCurSel(hwndCombo, iIndex);
  126. }
  127. }
  128. }
  129. }
  130. ResetWaitCursor();
  131. return FALSE;
  132. }
  133. void CFTEditDlg::_ConfigureDlg()
  134. {
  135. // Need to:
  136. // - position OK and Cancel
  137. // - resize dlg
  138. // - Show/hide Combo and its text
  139. RECT rcControl;
  140. RECT rcDialog;
  141. RECT rcCancel;
  142. RECT rcOK;
  143. int iStdMargins = 0;
  144. int iStdSpaceBetweenControls = 0;
  145. GetWindowRect(_hwnd, &rcDialog);
  146. GetWindowRect(GetDlgItem(_hwnd, IDC_FT_EDIT_PID_COMBO_TEXT),
  147. &rcControl);
  148. // Calculate the folowing (cannot be fixed, varies with dialog font)
  149. // [msadek]; screen coordinates. need to consider the mirrored case
  150. if(IS_WINDOW_RTL_MIRRORED(_hwnd))
  151. {
  152. iStdMargins = rcDialog.right - rcControl.right;
  153. }
  154. else
  155. {
  156. iStdMargins = rcControl.left - rcDialog.left;
  157. }
  158. iStdSpaceBetweenControls = MulDiv(4, iStdMargins, 7);
  159. // Move Cancel and OK button
  160. GetWindowRect(GetDlgItem(_hwnd,
  161. _fAdvanced ? IDC_FT_EDIT_PID_COMBO : IDC_FT_EDIT_EXT_EDIT),
  162. &rcControl);
  163. MapWindowRect(HWND_DESKTOP, _hwnd, &rcControl);
  164. GetWindowRect(GetDlgItem(_hwnd, IDCANCEL), &rcCancel);
  165. MapWindowRect(HWND_DESKTOP, _hwnd, &rcCancel);
  166. OffsetRect(&rcCancel, 0, -rcCancel.top);
  167. GetWindowRect(GetDlgItem(_hwnd, IDOK), &rcOK);
  168. MapWindowRect(HWND_DESKTOP, _hwnd, &rcOK);
  169. OffsetRect(&rcOK, 0, -rcOK.top);
  170. OffsetRect(&rcCancel, 0, rcControl.bottom + iStdSpaceBetweenControls);
  171. OffsetRect(&rcOK, 0, rcControl.bottom + iStdSpaceBetweenControls);
  172. SetWindowPos(GetDlgItem(_hwnd, IDOK), NULL,
  173. rcOK.left, rcOK.top, 0, 0, SWP_NOSIZE|SWP_SHOWWINDOW|SWP_NOZORDER);
  174. SetWindowPos(GetDlgItem(_hwnd, IDCANCEL), NULL,
  175. rcCancel.left, rcCancel.top, 0, 0, SWP_NOSIZE|SWP_SHOWWINDOW|SWP_NOZORDER);
  176. // Resize Dlg
  177. ClientToScreen(_hwnd, ((POINT*)&rcCancel) + 1);
  178. rcDialog.bottom = rcCancel.bottom + iStdMargins;
  179. SetWindowPos(_hwnd, NULL,
  180. 0, 0, rcDialog.right - rcDialog.left, rcDialog.bottom - rcDialog.top,
  181. SWP_NOMOVE|SWP_SHOWWINDOW|SWP_NOZORDER);
  182. // Show/Hide Combo and its text
  183. ShowWindow(GetDlgItem(_hwnd, IDC_FT_EDIT_PID_COMBO_TEXT), _fAdvanced);
  184. ShowWindow(GetDlgItem(_hwnd, IDC_FT_EDIT_PID_COMBO), _fAdvanced);
  185. // Set focus to combo
  186. SetFocus(GetDlgItem(_hwnd, IDC_FT_EDIT_PID_COMBO));
  187. }
  188. LRESULT CFTEditDlg::OnOK(WORD wNotif)
  189. {
  190. HRESULT hres = S_FALSE;
  191. // Pick up the extension
  192. GetDlgItemText(_hwnd, IDC_FT_EDIT_EXT_EDIT, _pftEditParam->szExt,
  193. _pftEditParam->dwExt);
  194. // Is it empty?
  195. if (0 != (*_pftEditParam->szExt))
  196. {
  197. // No, that's good
  198. // FEATURE: do some check for valid extension name
  199. IAssocInfo* pAI = NULL;
  200. hres = _pAssocStore->GetAssocInfo(_pftEditParam->szExt,
  201. AIINIT_EXT, &pAI);
  202. if (SUCCEEDED(hres))
  203. {
  204. BOOL fExist = FALSE;
  205. hres = pAI->GetBOOL(AIBOOL_EXTEXIST, &fExist);
  206. // Is this extension already existing?
  207. if (SUCCEEDED(hres) && !fExist)
  208. {
  209. // No, create it
  210. // Check for spaces in the ext name
  211. LPTSTR pszExt = _pftEditParam->szExt;
  212. while (*pszExt && (S_FALSE != hres))
  213. {
  214. if (TEXT(' ') == *pszExt)
  215. {
  216. hres = S_FALSE;
  217. ShellMessageBox(g_hinst, _hwnd,
  218. MAKEINTRESOURCE(IDS_FT_MB_NOSPACEINEXT),
  219. MAKEINTRESOURCE(IDS_FT), MB_OK | MB_ICONSTOP);
  220. // Set focus to Ext combo
  221. PostMessage(_hwnd, WM_CTRL_SETFOCUS, (WPARAM)0,
  222. (LPARAM)GetDlgItem(_hwnd, IDC_FT_EDIT_EXT_EDIT));
  223. }
  224. ++pszExt;
  225. }
  226. if (S_OK==hres)
  227. hres = pAI->Create();
  228. }
  229. if (S_OK==hres)
  230. hres = _HandleProgIDAssoc(pAI, _pftEditParam->szExt, fExist);
  231. pAI->Release();
  232. }
  233. }
  234. else
  235. {
  236. ShellMessageBox(g_hinst, _hwnd, MAKEINTRESOURCE(IDS_FT_MB_NOEXT),
  237. MAKEINTRESOURCE(IDS_FT), MB_OK | MB_ICONSTOP);
  238. // Set focus to Ext combo
  239. PostMessage(_hwnd, WM_CTRL_SETFOCUS, (WPARAM)0,
  240. (LPARAM)GetDlgItem(_hwnd, IDC_FT_EDIT_EXT_EDIT));
  241. }
  242. // If we fail, we are in serious trouble, so we just close the dialog
  243. ASSERT(SUCCEEDED(hres));
  244. if (S_FALSE != hres)
  245. EndDialog(_hwnd, IDOK);
  246. return FALSE;
  247. }
  248. HRESULT CFTEditDlg::_GetProgIDInfo(IAssocInfo* pAI, LPTSTR pszProgID,
  249. DWORD* pcchProgID, BOOL* pfNewProgID, BOOL* pfExplicitNew)
  250. {
  251. HWND hwndCombo = GetDlgItem(_hwnd, IDC_FT_EDIT_PID_COMBO);
  252. HRESULT hr = S_OK;
  253. *pfNewProgID = FALSE;
  254. *pfExplicitNew = FALSE;
  255. if (ComboBox_GetCount(hwndCombo))
  256. {
  257. int iSel = ComboBox_GetCurSel(hwndCombo);
  258. if (CB_ERR != iSel)
  259. {
  260. LPTSTR pszTmpProgID = (LPTSTR)ComboBox_GetItemData(hwndCombo, iSel);
  261. // Is this the "<New>" item (the only one with a ProgID == NULL)?
  262. if (!pszTmpProgID)
  263. {
  264. // Yes
  265. *pfNewProgID = TRUE;
  266. *pfExplicitNew = TRUE;
  267. }
  268. else
  269. {
  270. // No
  271. hr = StringCchCopy(pszProgID, *pcchProgID, pszTmpProgID);
  272. }
  273. }
  274. }
  275. else
  276. {
  277. *pfNewProgID = TRUE;
  278. }
  279. return hr;
  280. }
  281. HRESULT CFTEditDlg::_HandleProgIDAssoc(IAssocInfo* pAI, LPTSTR pszExt, BOOL fExtExist)
  282. {
  283. TCHAR szProgID[MAX_PROGID];
  284. DWORD cchProgID = ARRAYSIZE(szProgID);
  285. BOOL fNewProgID = FALSE;
  286. BOOL fExplicitNew = FALSE;
  287. *szProgID = 0;
  288. HRESULT hres = _GetProgIDInfo(pAI, szProgID, &cchProgID, &fNewProgID, &fExplicitNew);
  289. if (SUCCEEDED(hres))
  290. {
  291. // Is this Extension already existing?
  292. if (fExtExist)
  293. {
  294. //
  295. // First make sure it's not the exact same ext - progID assoc
  296. //
  297. TCHAR szTmpProgID[MAX_PROGID];
  298. DWORD cchTmpProgID = ARRAYSIZE(szTmpProgID);
  299. hres = pAI->GetString(AISTR_PROGID, szTmpProgID, &cchTmpProgID);
  300. // Did we got a progID?
  301. if (SUCCEEDED(hres))
  302. {
  303. // Yes
  304. // Are they the same?
  305. if (0 == lstrcmpi(szTmpProgID, szProgID))
  306. {
  307. // Yes, fail, nothing more to do
  308. hres = E_FAIL;
  309. }
  310. else
  311. {
  312. // No, go on
  313. hres = S_OK;
  314. }
  315. }
  316. else
  317. {
  318. // No, there probably is no ProgID, go on
  319. hres = S_OK;
  320. }
  321. //
  322. // Unless the user chose <New> explicitly ask if he wants to break the assoc
  323. //
  324. // Did the user explicitly chose <New> (and we did not failed already)?
  325. if (!fExplicitNew && SUCCEEDED(hres))
  326. {
  327. // We need to warn user that he will break existing assoc
  328. TCHAR szProgIDDescr[MAX_PROGIDDESCR];
  329. DWORD cchProgIDDescr = ARRAYSIZE(szProgIDDescr);
  330. hres = pAI->GetString(AISTR_PROGIDDESCR, szProgIDDescr, &cchProgIDDescr);
  331. if (SUCCEEDED(hres))
  332. {
  333. if (IDNO == ShellMessageBox(g_hinst, _hwnd, MAKEINTRESOURCE(IDS_FT_EDIT_ALREADYASSOC),
  334. MAKEINTRESOURCE(IDS_FT_EDIT_ALRASSOCTITLE), MB_YESNO | MB_ICONEXCLAMATION,
  335. pszExt, szProgIDDescr, pszExt, szProgIDDescr))
  336. {
  337. // S_FALSE means user does not want to go on
  338. hres = S_FALSE;
  339. }
  340. }
  341. else
  342. {
  343. // no progIDDescr... Check if we have a progID
  344. TCHAR szProgID[MAX_PROGID];
  345. DWORD cchProgID = ARRAYSIZE(szProgID);
  346. hres = pAI->GetString(AISTR_PROGID, szProgID, &cchProgID);
  347. if (FAILED(hres))
  348. {
  349. // no progID, set hres to S_OK so that we go on and create one
  350. hres = S_OK;
  351. }
  352. }
  353. }
  354. }
  355. // Should we go on and create new progID?
  356. if (S_OK==hres && fNewProgID)
  357. {
  358. // Yes, create it
  359. IAssocInfo* pAIProgID = NULL;
  360. hres = _pAssocStore->GetAssocInfo(NULL, AIINIT_PROGID, &pAIProgID);
  361. if (SUCCEEDED(hres))
  362. {
  363. hres = pAIProgID->Create();
  364. if (SUCCEEDED(hres))
  365. {
  366. TCHAR szExt[MAX_EXT];
  367. DWORD cchExt = ARRAYSIZE(szExt);
  368. TCHAR szProgIDDescr[MAX_PROGIDDESCR];
  369. HRESULT hresTmp = pAI->GetString(AISTR_EXT, szExt, &cchExt);
  370. if (SUCCEEDED(hresTmp) && *szExt)
  371. {
  372. MakeDefaultProgIDDescrFromExt(szProgIDDescr, ARRAYSIZE(szProgIDDescr), szExt);
  373. hresTmp = pAIProgID->SetString(AISTR_PROGIDDESCR, szProgIDDescr);
  374. }
  375. // Get the ProgID for later use
  376. pAIProgID->GetString(AISTR_PROGID, szProgID, &cchProgID);
  377. }
  378. pAIProgID->Release();
  379. }
  380. }
  381. if (S_OK==hres)
  382. {
  383. // Set the new extension progID
  384. hres = pAI->SetString(AISTR_PROGID, szProgID);
  385. if (SUCCEEDED(hres))
  386. {
  387. // Get the description
  388. pAI->GetString(AISTR_PROGIDDESCR, _pftEditParam->szProgIDDescr,
  389. &(_pftEditParam->dwProgIDDescr));
  390. }
  391. }
  392. }
  393. return hres;
  394. }
  395. LRESULT CFTEditDlg::OnCancel(WORD wNotif)
  396. {
  397. EndDialog(_hwnd, IDCANCEL);
  398. return FALSE;
  399. }
  400. HRESULT CFTEditDlg::_FillProgIDDescrCombo()
  401. {
  402. HWND hwndCombo = GetDlgItem(_hwnd, IDC_FT_EDIT_PID_COMBO);
  403. // Data stuff
  404. IEnumAssocInfo* pEnum = NULL;
  405. HRESULT hres = _pAssocStore->EnumAssocInfo(
  406. ASENUM_PROGID | ASENUM_ASSOC_ALL, NULL, AIINIT_NONE, &pEnum);
  407. if (SUCCEEDED(hres))
  408. {
  409. IAssocInfo* pAI = NULL;
  410. while ((E_OUTOFMEMORY != hres) && (S_OK == pEnum->Next(&pAI)))
  411. {
  412. TCHAR szProgIDDescr[MAX_PROGIDDESCR];
  413. DWORD cchProgIDDescr = ARRAYSIZE(szProgIDDescr);
  414. hres = pAI->GetString(AISTR_PROGIDDESCR, szProgIDDescr, &cchProgIDDescr);
  415. if (SUCCEEDED(hres))
  416. {
  417. int iIndex = CB_ERR;
  418. if (*szProgIDDescr)
  419. {
  420. if (CB_ERR == ComboBox_FindStringExact(hwndCombo, -1, szProgIDDescr))
  421. iIndex = ComboBox_AddString(hwndCombo, szProgIDDescr);
  422. }
  423. if ((CB_ERR != iIndex) && (CB_ERRSPACE != iIndex))
  424. {
  425. TCHAR szProgID[MAX_PROGID];
  426. DWORD cchProgID = ARRAYSIZE(szProgID);
  427. hres = pAI->GetString(AISTR_PROGID, szProgID, &cchProgID);
  428. if (SUCCEEDED(hres))
  429. {
  430. LPTSTR pszProgID = _AddProgID(szProgID); // allocate and copy ID
  431. if(pszProgID)
  432. {
  433. ComboBox_SetItemData(hwndCombo, iIndex, pszProgID);
  434. }
  435. else
  436. {
  437. hres = E_OUTOFMEMORY;
  438. ShellMessageBox(g_hinst, _hwnd, MAKEINTRESOURCE(IDS_ERROR +
  439. ERROR_NOT_ENOUGH_MEMORY), MAKEINTRESOURCE(IDS_FT),
  440. MB_OK | MB_ICONSTOP);
  441. // Already allocated mem will be cleaned-up in OnDestroy
  442. }
  443. }
  444. }
  445. }
  446. pAI->Release();
  447. }
  448. pEnum->Release();
  449. if (SUCCEEDED(hres))
  450. {
  451. TCHAR szNew[20];
  452. if (LoadString(g_hinst, IDS_FT_NEW, szNew, ARRAYSIZE(szNew)))
  453. {
  454. int iIndex = ComboBox_InsertString(hwndCombo, 0, szNew);
  455. if (CB_ERR != iIndex)
  456. ComboBox_SetItemData(hwndCombo, iIndex, NULL);
  457. }
  458. }
  459. }
  460. return hres;
  461. }
  462. BOOL CFTEditDlg::_SelectProgIDDescr(LPTSTR pszProgIDDescr)
  463. {
  464. int iIndex = ComboBox_SelectString(GetDlgItem(_hwnd, IDC_FT_EDIT_PID_COMBO),
  465. -1, pszProgIDDescr);
  466. return ((CB_ERR != iIndex) ? TRUE : FALSE);
  467. }
  468. LRESULT CFTEditDlg::OnDestroy(WPARAM wParam, LPARAM lParam)
  469. {
  470. _CleanupProgIDs();
  471. CFTDlg::OnDestroy(wParam, lParam);
  472. return FALSE;
  473. }
  474. // Clone a progID
  475. LPTSTR CFTEditDlg::_AddProgID(LPTSTR pszProgID)
  476. {
  477. ASSERT(_hHeapProgID);
  478. DWORD dwStrBufferLen = lstrlen(pszProgID) + 1;
  479. LPTSTR pNewID = (LPTSTR) HeapAlloc(_hHeapProgID, 0, dwStrBufferLen * sizeof(TCHAR));
  480. if(pNewID)
  481. {
  482. StringCchCopy(pNewID, dwStrBufferLen, pszProgID);
  483. }
  484. return pNewID;
  485. }
  486. void CFTEditDlg::_CleanupProgIDs()
  487. {
  488. if (_hHeapProgID)
  489. HeapDestroy(_hHeapProgID);
  490. }
  491. ///////////////////////////////////////////////////////////////////////////////
  492. // Windows boiler plate code
  493. LRESULT CFTEditDlg::OnCommand(WPARAM wParam, LPARAM lParam)
  494. {
  495. LRESULT lRes = FALSE;
  496. switch(GET_WM_COMMAND_ID(wParam, lParam))
  497. {
  498. case IDC_FT_EDIT_ADVANCED:
  499. lRes = OnAdvancedButton(GET_WM_COMMAND_CMD(wParam, lParam));
  500. break;
  501. case IDC_FT_EDIT_EXT_EDIT:
  502. lRes = OnEdit(GET_WM_COMMAND_CMD(wParam, lParam));
  503. break;
  504. default:
  505. lRes = CFTDlg::OnCommand(wParam, lParam);
  506. break;
  507. }
  508. return lRes;
  509. }
  510. LRESULT CFTEditDlg::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
  511. {
  512. LRESULT lRes = FALSE;
  513. switch(uMsg)
  514. {
  515. case WM_TIMER:
  516. if (ID_TIMER == wParam)
  517. lRes = OnTimer((UINT)wParam);
  518. else
  519. lRes = CFTDlg::WndProc(uMsg, wParam, lParam);
  520. break;
  521. default:
  522. lRes = CFTDlg::WndProc(uMsg, wParam, lParam);
  523. break;
  524. }
  525. return lRes;
  526. }