Source code of Windows XP (NT5)
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.

734 lines
18 KiB

  1. #include "precomp.h"
  2. #pragma hdrstop
  3. /***************************************************************************/
  4. /****************** Basic Class Dialog Handlers ****************************/
  5. /***************************************************************************/
  6. #define cchpMax 511
  7. /*
  8. ** Purpose:
  9. ** Multi Edit, Checkbox, radio button & MultiComboBox Dialog procedure.
  10. ** Control IDs:
  11. ** The Edit controls must have IDs of IDC_EDIT1 to IDC_EDIT10.
  12. ** Pushbuttons recognized are IDC_O, IDC_C, IDC_M, IDC_H, IDC_X, and IDC_B.
  13. ** Initialization:
  14. ** The symbol $(EditTextIn) is used to set the initial text in the Edit
  15. ** controls. The symbol $(EditTextLim) is used to set the limit of the
  16. ** text in the edit fields.
  17. ** Termination:
  18. ** The strings in the Edit controls are stored in the symbol $(EditTextOut)
  19. ** The id of the Pushbutton (eg IDC_C) which caused termination is
  20. ** converted to a string and stored in the symbol $(ButtonPressed).
  21. *****************************************************************************/
  22. INT_PTR APIENTRY FGstComboRadDlgProc (HWND hdlg,
  23. UINT wMsg,
  24. WPARAM wParam,
  25. LPARAM lParam)
  26. {
  27. CHP rgchNum[10];
  28. CHP rgchText[cchpMax + 1];
  29. SZ sz, szListIn, szListOut, szEditTextIn, szEditTextLim;
  30. RGSZ rgsz, rgszIn, rgszOut, rgszListIn,
  31. rgszEditTextIn, rgszEditTextLim ;
  32. PSZ psz, pszIn, pszOut, pszListIn, pszEditTextIn, pszEditTextLim ;
  33. LRESULT iItem;
  34. WORD idc;
  35. static BOOL fNotify[10];
  36. INT i, nCount, nCurSel, iFocus, iEditMax, iButtonChecked;
  37. HWND hctl ;
  38. static INT iButtonMax;
  39. BOOL fResult = fTrue ;
  40. Unused(lParam);
  41. switch (wMsg) {
  42. case STF_REINITDIALOG:
  43. if ((sz = SzFindSymbolValueInSymTab("ReInit")) == (SZ)NULL ||
  44. (CrcStringCompareI(sz, "YES") != crcEqual)) {
  45. return(fResult);
  46. }
  47. case WM_INITDIALOG:
  48. AssertDataSeg();
  49. if( wMsg == WM_INITDIALOG ) {
  50. FCenterDialogOnDesktop(hdlg);
  51. }
  52. //
  53. // find the initalisers: EditTextIn, EditTextLim
  54. //
  55. szEditTextIn = SzFindSymbolValueInSymTab("EditTextIn");
  56. szEditTextLim = SzFindSymbolValueInSymTab("EditTextLim");
  57. if ( szEditTextIn == (SZ)NULL ||
  58. szEditTextLim == (SZ)NULL )
  59. {
  60. Assert(fFalse);
  61. return(fResult);
  62. }
  63. //
  64. // Convert initializers to rgsz structures
  65. //
  66. while ((pszEditTextIn = rgszEditTextIn = RgszFromSzListValue(szEditTextIn)) == (RGSZ)NULL)
  67. {
  68. if (!FHandleOOM(hdlg)) {
  69. DestroyWindow(GetParent(hdlg));
  70. return(fResult);
  71. }
  72. }
  73. while ((pszEditTextLim = rgszEditTextLim = RgszFromSzListValue(szEditTextLim)) == (RGSZ)NULL)
  74. {
  75. if (!FHandleOOM(hdlg)) {
  76. DestroyWindow(GetParent(hdlg));
  77. return(fResult);
  78. }
  79. }
  80. //
  81. // Circulate through the initialisers: EditTextIn, EditTextLim
  82. // in tandem, initialising the edit boxes that
  83. // are there in this dialog
  84. //
  85. idc = IDC_EDIT1;
  86. while ( (szEditTextIn = *pszEditTextIn++) != (SZ)NULL &&
  87. (szEditTextLim = *pszEditTextLim++) != (SZ)NULL )
  88. {
  89. iEditMax = idc ;
  90. // First set the limit of the text in the edit field
  91. SendDlgItemMessage(
  92. hdlg,
  93. idc,
  94. EM_LIMITTEXT,
  95. atoi(szEditTextLim),
  96. 0L
  97. );
  98. // And then set the text in the edit field
  99. SetDlgItemText(hdlg, idc++, (LPSTR)szEditTextIn);
  100. }
  101. EvalAssert(FFreeRgsz(rgszEditTextIn));
  102. EvalAssert(FFreeRgsz(rgszEditTextLim));
  103. // Find which control is to receive focus.
  104. // First look for a control ID in "RCCtlFocusOn";
  105. // otherwise, set focus on the edit control
  106. // based on the numeric value of "EditFocusOn".
  107. iFocus = -1 ;
  108. if ( sz = SzFindSymbolValueInSymTab("RCCtlFocusOn") )
  109. {
  110. iFocus = atoi( sz ) ;
  111. }
  112. if ( iFocus < 0
  113. && (sz = SzFindSymbolValueInSymTab("EditFocusOn")) )
  114. {
  115. iFocus = IDC_EDIT1 + atoi( sz ) - 1 ;
  116. if ( iFocus < IDC_EDIT1 )
  117. {
  118. iFocus = IDC_EDIT1 ;
  119. }
  120. else
  121. if ( iFocus > iEditMax )
  122. {
  123. iFocus = iEditMax ;
  124. }
  125. }
  126. // Set focus on the chosen field (if there really is such a control)
  127. if ( iFocus >= 0 && (hctl = GetDlgItem( hdlg, iFocus )) )
  128. {
  129. SetFocus( hctl ) ;
  130. fResult = FALSE ; // Cause dialog manager to preserve focus
  131. }
  132. if ((sz = SzFindSymbolValueInSymTab("EditFocus")) == (SZ)NULL) {
  133. sz = "END";
  134. }
  135. // Initialise the OPTIONAL combo boxes
  136. szListIn = SzFindSymbolValueInSymTab("ComboListItemsIn");
  137. szListOut = SzFindSymbolValueInSymTab("ComboListItemsOut");
  138. if ( szListIn != (SZ)NULL && szListOut != (SZ)NULL ) {
  139. while ((pszIn = rgszIn = RgszFromSzListValue(szListIn)) == (RGSZ)NULL)
  140. if (!FHandleOOM(hdlg))
  141. {
  142. DestroyWindow(GetParent(hdlg));
  143. return(fResult);
  144. }
  145. while ((pszOut =rgszOut = RgszFromSzListValue(szListOut)) == (RGSZ)NULL)
  146. if (!FHandleOOM(hdlg))
  147. {
  148. DestroyWindow(GetParent(hdlg));
  149. return(fResult);
  150. }
  151. idc = IDC_COMBO1;
  152. while (*pszIn != (SZ)NULL)
  153. {
  154. Assert(*pszOut != (SZ)NULL);
  155. if ((szListIn = SzFindSymbolValueInSymTab(*pszIn)) == (SZ)NULL)
  156. {
  157. Assert(fFalse);
  158. EvalAssert(FFreeRgsz(rgszIn));
  159. EvalAssert(FFreeRgsz(rgszOut));
  160. return(fResult);
  161. }
  162. while ((pszListIn = rgszListIn = RgszFromSzListValue(szListIn))
  163. == (RGSZ)NULL)
  164. if (!FHandleOOM(hdlg))
  165. {
  166. DestroyWindow(GetParent(hdlg));
  167. return(fResult);
  168. }
  169. SendDlgItemMessage(hdlg, idc, CB_RESETCONTENT, 0, 0L);
  170. while (*pszListIn != (SZ)NULL)
  171. SendDlgItemMessage(hdlg, idc, CB_ADDSTRING, 0,
  172. (LPARAM)*pszListIn++);
  173. //
  174. // Try to find out the item to select from the combo list.
  175. //
  176. // If there are no items, set nCurSel to -1 to clear the combo
  177. // If there are items, however the ListOut variable either doesn't
  178. // exist or is "" then set the nCurSel to 0 ( the first element )
  179. // If the ListOut var exists and is found in the list box then
  180. // set the nCurSel to the index of the element found
  181. //
  182. nCount = (INT)SendDlgItemMessage(hdlg, idc, CB_GETCOUNT, 0, 0L);
  183. if ( nCount ) {
  184. nCurSel = 0;
  185. if ((szListOut = SzFindSymbolValueInSymTab(*pszOut)) != (SZ)NULL &&
  186. CrcStringCompareI(szListOut, "") != crcEqual) {
  187. CHP szItemCur[256];
  188. for (i = 0; i < nCount; i++) {
  189. if ( (SendDlgItemMessage(
  190. hdlg,
  191. idc,
  192. CB_GETLBTEXT,
  193. (WPARAM)i,
  194. (LPARAM)szItemCur
  195. ) != CB_ERR)
  196. && (CrcStringCompareI(szItemCur, szListOut) == crcEqual)
  197. ) {
  198. nCurSel = i;
  199. break;
  200. }
  201. }
  202. }
  203. }
  204. else {
  205. nCurSel = -1;
  206. }
  207. SendDlgItemMessage(hdlg, idc, CB_SETCURSEL, (WPARAM)nCurSel, 0L);
  208. EvalAssert(FFreeRgsz(rgszListIn));
  209. idc++;
  210. pszIn++;
  211. pszOut++;
  212. }
  213. EvalAssert(FFreeRgsz(rgszIn));
  214. EvalAssert(FFreeRgsz(rgszOut));
  215. // Extract the information on which combo modifications should
  216. // be modified
  217. for (i = 0; i < 10; i++) {
  218. fNotify[i] = fFalse;
  219. }
  220. if ((sz = SzFindSymbolValueInSymTab("NotifyFields")) != (SZ)NULL) {
  221. while ((psz = rgsz = RgszFromSzListValue(sz)) == (RGSZ)NULL) {
  222. if (!FHandleOOM(hdlg)) {
  223. DestroyWindow(GetParent(hdlg));
  224. return(fResult);
  225. }
  226. }
  227. for (i = 0; (i < 10) && (*psz != (SZ) NULL); i++) {
  228. fNotify[i] = (CrcStringCompareI(*(psz++), "YES") == crcEqual) ?
  229. fTrue : fFalse;
  230. }
  231. EvalAssert(FFreeRgsz(rgsz));
  232. }
  233. }
  234. // Initialise the check boxes, note that check boxes are optional
  235. if ((sz = SzFindSymbolValueInSymTab("CheckItemsIn")) != (SZ)NULL) {
  236. while ((psz = rgsz = RgszFromSzListValue(sz)) == (RGSZ)NULL) {
  237. if (!FHandleOOM(hdlg)) {
  238. DestroyWindow(GetParent(hdlg));
  239. return(fResult);
  240. }
  241. }
  242. idc = IDC_B1;
  243. while (*psz != (SZ)NULL)
  244. {
  245. WORD wCheck = 0;
  246. if (CrcStringCompare(*(psz++), "ON") == crcEqual)
  247. wCheck = 1;
  248. CheckDlgButton(hdlg, idc++, wCheck);
  249. }
  250. EvalAssert(FFreeRgsz(rgsz));
  251. if ((sz = SzFindSymbolValueInSymTab("CBOptionsGreyed")) == (SZ)NULL)
  252. {
  253. PreCondition(fFalse, fTrue);
  254. return(fResult);
  255. }
  256. while ((psz = rgsz = RgszFromSzListValue(sz)) == (RGSZ)NULL)
  257. if (!FHandleOOM(hdlg))
  258. {
  259. DestroyWindow(GetParent(hdlg));
  260. return(fResult);
  261. }
  262. while (*psz != (SZ)NULL)
  263. {
  264. SZ sz = *(psz++);
  265. INT i = atoi(sz);
  266. if (i > 0 && i <= 10)
  267. EnableWindow(GetDlgItem(hdlg, IDC_B0 + i), 0);
  268. else if (*sz != '\0')
  269. PreCondition(fFalse, fTrue);
  270. }
  271. EvalAssert(FFreeRgsz(rgsz));
  272. }
  273. // Handle all the text status fields in this dialog
  274. if ((sz = SzFindSymbolValueInSymTab("TextFields")) != (SZ)NULL) {
  275. WORD idcStatus;
  276. while ((psz = rgsz = RgszFromSzListValue(sz)) == (RGSZ)NULL) {
  277. if (!FHandleOOM(hdlg)) {
  278. DestroyWindow(GetParent(hdlg));
  279. return(fResult);
  280. }
  281. }
  282. idcStatus = IDC_TEXT1;
  283. while (*psz != (SZ)NULL && GetDlgItem(hdlg, idcStatus)) {
  284. SetDlgItemText (hdlg, idcStatus++,*psz++);
  285. }
  286. EvalAssert(FFreeRgsz(rgsz));
  287. }
  288. // radio button initialize
  289. for (i = IDC_RB1; i <= IDC_RB10 && GetDlgItem(hdlg, i) != (HWND)NULL; i++)
  290. ;
  291. iButtonMax = i - 1;
  292. if ((sz = SzFindSymbolValueInSymTab("RadioIn")) != (SZ)NULL) {
  293. while ((psz = rgsz = RgszFromSzListValue(sz)) == (RGSZ)NULL) {
  294. if (!FHandleOOM(hdlg)) {
  295. DestroyWindow(GetParent(hdlg));
  296. return(fResult);
  297. }
  298. }
  299. while (*psz != (SZ)NULL) {
  300. iButtonChecked = atoi(*(psz++));
  301. if (iButtonChecked < 1)
  302. iButtonChecked = 0;
  303. if (iButtonChecked > 10)
  304. iButtonChecked = 10;
  305. if (iButtonChecked != 0)
  306. SendDlgItemMessage(hdlg, IDC_RB0 + iButtonChecked, BM_SETCHECK,1,0L);
  307. }
  308. EvalAssert(FFreeRgsz(rgsz));
  309. }
  310. if ((sz = SzFindSymbolValueInSymTab("RadioOptionsGreyed")) != (SZ)NULL)
  311. {
  312. while ((psz = rgsz = RgszFromSzListValue(sz)) == (RGSZ)NULL)
  313. if (!FHandleOOM(hdlg))
  314. {
  315. DestroyWindow(GetParent(hdlg));
  316. return(fResult);
  317. }
  318. while (*psz != (SZ)NULL)
  319. {
  320. SZ sz = *(psz++);
  321. INT i = atoi(sz);
  322. if (i > 0 && i <= 10 && i != iButtonChecked)
  323. EnableWindow(GetDlgItem(hdlg, IDC_RB0 + i), 0);
  324. else if (*sz != '\0')
  325. PreCondition(fFalse, fTrue);
  326. }
  327. EvalAssert(FFreeRgsz(rgsz));
  328. }
  329. return(fResult);
  330. case WM_CLOSE:
  331. PostMessage(
  332. hdlg,
  333. WM_COMMAND,
  334. MAKELONG(IDC_X, BN_CLICKED),
  335. 0L
  336. );
  337. return(fResult);
  338. case WM_COMMAND:
  339. switch (idc = LOWORD(wParam))
  340. {
  341. // Edit Box Notification
  342. case IDC_EDIT1:
  343. break;
  344. // Check box Notification
  345. case IDC_B1:
  346. case IDC_B2:
  347. case IDC_B3:
  348. case IDC_B4:
  349. case IDC_B5:
  350. case IDC_B6:
  351. case IDC_B7:
  352. case IDC_B8:
  353. case IDC_B9:
  354. case IDC_B10:
  355. CheckDlgButton(hdlg, LOWORD(wParam),
  356. (WORD)!IsDlgButtonChecked(hdlg, (int)wParam));
  357. break;
  358. case IDC_RB1:
  359. case IDC_RB2:
  360. case IDC_RB3:
  361. case IDC_RB4:
  362. case IDC_RB5:
  363. case IDC_RB6:
  364. case IDC_RB7:
  365. case IDC_RB8:
  366. case IDC_RB9:
  367. case IDC_RB10:
  368. /*
  369. CheckRadioButton(hdlg, IDC_RB1, iButtonMax, (INT)idc);
  370. */
  371. if (HIWORD(wParam) != BN_DOUBLECLICKED)
  372. break;
  373. wParam = IDC_C;
  374. /* Fall through */
  375. case IDC_COMBO1:
  376. case IDC_COMBO2:
  377. case IDC_COMBO3:
  378. case IDC_COMBO4:
  379. case IDC_COMBO5:
  380. case IDC_COMBO6:
  381. case IDC_COMBO7:
  382. case IDC_COMBO8:
  383. case IDC_COMBO9:
  384. switch (HIWORD(wParam)) {
  385. case CBN_SELCHANGE:
  386. if (fNotify[idc-IDC_COMBO1] == fTrue) {
  387. break;
  388. }
  389. default:
  390. return fFalse;
  391. }
  392. // Other Buttons
  393. case IDCANCEL:
  394. if (LOWORD(wParam) == IDCANCEL) {
  395. if (!GetDlgItem(hdlg, IDC_B) || HIWORD(GetKeyState(VK_CONTROL)) || HIWORD(GetKeyState(VK_SHIFT)) || HIWORD(GetKeyState(VK_MENU)))
  396. {
  397. break;
  398. }
  399. wParam = IDC_B;
  400. }
  401. case IDC_O:
  402. case IDC_C:
  403. case IDC_M:
  404. case IDC_B:
  405. case IDC_X:
  406. case IDC_BTN0:
  407. case IDC_BTN1: case IDC_BTN2: case IDC_BTN3:
  408. case IDC_BTN4: case IDC_BTN5: case IDC_BTN6:
  409. case IDC_BTN7: case IDC_BTN8: case IDC_BTN9:
  410. // Add the Button checked to the symbol table
  411. _itoa((INT)wParam, rgchNum, 10);
  412. while (!FAddSymbolValueToSymTab("ButtonPressed", rgchNum))
  413. if (!FHandleOOM(hdlg)) {
  414. DestroyWindow(GetParent(hdlg));
  415. return(fResult);
  416. }
  417. // Handle the multiple edit fields
  418. // Add EditTextOut list variable to the symbol table
  419. for (i = 0; i < 10; i++) {
  420. if (GetDlgItem(hdlg, IDC_EDIT1 + i) == (HWND)NULL) {
  421. break;
  422. }
  423. }
  424. // i has the number of edit fields, allocate an rgsz structure
  425. // with i+1 entries (last one NULL TERMINATOR)
  426. nCount = i;
  427. while ((rgsz = (RGSZ)SAlloc((CB)((nCount + 1) * sizeof(SZ))))
  428. == (RGSZ)NULL) {
  429. if (!FHandleOOM(hdlg)) {
  430. DestroyWindow(GetParent(hdlg));
  431. return(fResult);
  432. }
  433. }
  434. rgsz[nCount] = (SZ)NULL;
  435. // Circulate through the edit fields in the dialog box, determining
  436. // the text in each and storing it in the
  437. for (i = 0; i < nCount; i++) {
  438. SendDlgItemMessage(
  439. hdlg,
  440. IDC_EDIT1 + i,
  441. (WORD)WM_GETTEXT,
  442. cchpMax + 1,
  443. (LPARAM)rgchText
  444. );
  445. rgsz[i] = SzDupl(rgchText);
  446. }
  447. // Form a list out of the rgsz structure
  448. while ((sz = SzListValueFromRgsz(rgsz)) == (SZ)NULL) {
  449. if (!FHandleOOM(hdlg)) {
  450. DestroyWindow(GetParent(hdlg));
  451. return(fResult);
  452. }
  453. }
  454. // Set the EditTextOut symbol to this list
  455. while (!FAddSymbolValueToSymTab("EditTextOut", sz)) {
  456. if (!FHandleOOM(hdlg)) {
  457. DestroyWindow(GetParent(hdlg));
  458. return(fResult);
  459. }
  460. }
  461. EvalAssert(FFreeRgsz(rgsz));
  462. SFree(sz);
  463. // Extract the checkbox states.
  464. while ((psz = rgsz = (RGSZ)SAlloc((CB)(11 * sizeof(SZ)))) ==
  465. (RGSZ)NULL)
  466. if (!FHandleOOM(hdlg)) {
  467. DestroyWindow(GetParent(hdlg));
  468. return(fResult);
  469. }
  470. for (idc = IDC_B1; GetDlgItem(hdlg, idc); psz++, idc++) {
  471. BOOL fChecked = IsDlgButtonChecked(hdlg, idc);
  472. while ((*psz = SzDupl(fChecked ? "ON" : "OFF")) == (SZ)NULL) {
  473. if (!FHandleOOM(hdlg)) {
  474. DestroyWindow(GetParent(hdlg));
  475. return(fResult);
  476. }
  477. }
  478. }
  479. *psz = (SZ)NULL;
  480. while ((sz = SzListValueFromRgsz(rgsz)) == (SZ)NULL) {
  481. if (!FHandleOOM(hdlg)) {
  482. DestroyWindow(GetParent(hdlg));
  483. return(fResult);
  484. }
  485. }
  486. while (!FAddSymbolValueToSymTab("CheckItemsOut", sz)) {
  487. if (!FHandleOOM(hdlg)) {
  488. DestroyWindow(GetParent(hdlg));
  489. return(fResult);
  490. }
  491. }
  492. SFree(sz);
  493. EvalAssert(FFreeRgsz(rgsz));
  494. // extract radio button
  495. while ((psz = rgsz = (RGSZ)SAlloc((CB)(11 * sizeof(SZ)))) ==
  496. (RGSZ)NULL)
  497. if (!FHandleOOM(hdlg)) {
  498. DestroyWindow(GetParent(hdlg));
  499. return(fResult);
  500. }
  501. for (idc = IDC_RB1, i=1; GetDlgItem(hdlg, idc); idc++, i++) {
  502. if (SendDlgItemMessage(hdlg, idc, BM_GETCHECK, 0, 0L))
  503. {
  504. CHP chpID [10];
  505. wsprintf( chpID, "%d", i );
  506. while ((*psz = SzDupl( chpID ))==(SZ)NULL) {
  507. if (!FHandleOOM(hdlg)) {
  508. DestroyWindow(GetParent(hdlg));
  509. return(fResult);
  510. }
  511. }
  512. psz++;
  513. }
  514. }
  515. *psz = (SZ)NULL;
  516. while ((sz = SzListValueFromRgsz(rgsz)) == (SZ)NULL) {
  517. if (!FHandleOOM(hdlg)) {
  518. DestroyWindow(GetParent(hdlg));
  519. return(fResult);
  520. }
  521. }
  522. while (!FAddSymbolValueToSymTab("RadioOut", sz)) {
  523. if (!FHandleOOM(hdlg)) {
  524. DestroyWindow(GetParent(hdlg));
  525. return(fResult);
  526. }
  527. }
  528. SFree(sz);
  529. EvalAssert(FFreeRgsz(rgsz));
  530. // Extract the selections in the combo boxes and add them to the
  531. // symbol table
  532. if ((szListOut = SzFindSymbolValueInSymTab("ComboListItemsOut"))
  533. == (SZ)NULL)
  534. {
  535. Assert(fFalse);
  536. break;
  537. }
  538. while ((pszOut = rgszOut = RgszFromSzListValue(szListOut))
  539. == (RGSZ)NULL)
  540. if (!FHandleOOM(hdlg))
  541. {
  542. DestroyWindow(GetParent(hdlg));
  543. return(fResult);
  544. }
  545. idc = IDC_COMBO1;
  546. while (*pszOut != (SZ)NULL) {
  547. if ((iItem = SendDlgItemMessage(
  548. hdlg,
  549. idc,
  550. CB_GETCURSEL,
  551. 0,
  552. 0L
  553. )) == CB_ERR) {
  554. *rgchText = '\0';
  555. }
  556. else {
  557. SendDlgItemMessage(
  558. hdlg,
  559. idc,
  560. CB_GETLBTEXT,
  561. (WPARAM)iItem,
  562. (LPARAM)rgchText
  563. );
  564. }
  565. while (!FAddSymbolValueToSymTab(*pszOut, rgchText)) {
  566. if (!FHandleOOM(hdlg)) {
  567. DestroyWindow(GetParent(hdlg));
  568. return(fResult);
  569. }
  570. }
  571. pszOut++;
  572. idc++;
  573. }
  574. EvalAssert(FFreeRgsz(rgszOut));
  575. PostMessage(GetParent(hdlg), (WORD)STF_UI_EVENT, 0, 0L);
  576. break;
  577. }
  578. break;
  579. case STF_DESTROY_DLG:
  580. PostMessage(GetParent(hdlg), (WORD)STF_MULTICOMBO_RADIO_DLG_DESTROYED, 0, 0L);
  581. DestroyWindow(hdlg);
  582. return(fResult);
  583. }
  584. return(fFalse);
  585. }