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.

941 lines
19 KiB

  1. /*++
  2. Copyright (c) 1994 Microsoft Corporation
  3. Module Name:
  4. MAINWND.H
  5. Abstract:
  6. Main Window Procedure
  7. Author:
  8. Bob Watson (a-robw)
  9. Revision History:
  10. 17 Feb 94 Written
  11. --*/
  12. //
  13. // Windows Include Files
  14. //
  15. #include <windows.h>
  16. #include <stdio.h>
  17. #include <malloc.h>
  18. #include <tchar.h> // unicode macros
  19. //
  20. // app include files
  21. //
  22. #include "otnboot.h"
  23. #include "otnbtdlg.h"
  24. #ifdef TERMSRV
  25. extern TCHAR szCommandLineVal[MAX_PATH];
  26. extern TCHAR szHelpFileName[MAX_PATH];
  27. #endif // TERMSRV
  28. //
  29. //
  30. #define HELP_USE_STRING 0 // use context strings, not id #'s for help
  31. //
  32. //
  33. extern POINT ptWndPos; // top left corner of window for placement
  34. static HWND hwndDisplay = NULL; // dialog to be/being displayed
  35. static HWND hwndMain = NULL; // window handle for Help interface
  36. static DWORD dwHelpContextId = 0; // id to send to help for context sens.
  37. //
  38. typedef struct _DLG_DATA {
  39. HWND hWnd; // handle of parent window
  40. HINSTANCE hInst; // instance containing resources
  41. LPTSTR szIdDlg; // ID of Dialog to start
  42. DLGPROC ProcName; // dialog Procedure to call
  43. LPARAM lArg; // optional argument (0 if not used);
  44. } DLG_DATA, *PDLG_DATA;
  45. BOOL
  46. ShowAppHelp (
  47. IN HWND hwndDlg,
  48. IN WORD wContext
  49. )
  50. /*++
  51. Routine Description:
  52. Generic routine to call WinHelp engine for displaying application
  53. help. wContext parameter is used for context.
  54. Arguments:
  55. IN HWND hwndDlg
  56. window handle of dialog calling function
  57. IN WORD wContext
  58. help context:
  59. id of a string resource that is used as help context string
  60. Return Value:
  61. TRUE if help called successfully
  62. --*/
  63. {
  64. LPTSTR szKeyString;
  65. UINT nHelpCmd;
  66. DWORD dwHelpParam;
  67. szKeyString = (LPTSTR)GlobalAlloc(GPTR, MAX_PATH_BYTES);
  68. if (szKeyString == NULL) return FALSE;
  69. #if HELP_USE_STRING
  70. if (wContext != 0) {
  71. if (LoadString (
  72. (HINSTANCE)GetWindowLongPtr(hwndDlg, GWLP_HINSTANCE),
  73. wContext,
  74. szKeyString,
  75. MAX_PATH) > 0) {
  76. nHelpCmd = HELP_KEY;
  77. dwHelpParam = (DWORD)szKeyString;
  78. } else {
  79. nHelpCmd = HELP_CONTENTS;
  80. dwHelpParam = 0;
  81. }
  82. } else {
  83. nHelpCmd = HELP_CONTENTS;
  84. dwHelpParam = 0;
  85. }
  86. #else
  87. nHelpCmd = HELP_CONTEXT;
  88. dwHelpParam = wContext;
  89. #endif
  90. #ifdef TERMSRV
  91. if( szHelpFileName[0] != _T('\0') ) {
  92. WinHelp (hwndMain,
  93. szHelpFileName,
  94. HELP_FINDER,
  95. 0 );
  96. }
  97. else {
  98. #endif // TERMSRV
  99. WinHelp (hwndMain,
  100. cszHelpFile,
  101. nHelpCmd,
  102. dwHelpParam);
  103. #ifdef TERMSRV
  104. }
  105. #endif // TERMSRV
  106. FREE_IF_ALLOC (szKeyString);
  107. return TRUE;
  108. }
  109. static
  110. LRESULT
  111. MainWnd_UPDATE_WINDOW_POS (
  112. IN HWND hWnd,
  113. IN WPARAM wParam, // x Pos of top left corner
  114. IN LPARAM lParam // y Pos of top left corner
  115. )
  116. /*++
  117. Routine Description:
  118. External window message used to register location of a dialog box
  119. window so the next dialo can be placed in the same spot.
  120. Dialog box sends this message whenever it's moved and the top
  121. left corner is stored in a global variable by this message.
  122. Arguments:
  123. IN HWND hWnd,
  124. IN WPARAM wParam, // x Pos of top left corner
  125. IN LPARAM lParam // y Pos of top left corner
  126. location coordinates are in SCREEN pixels
  127. Return Value:
  128. ERROR_SUCCESS
  129. --*/
  130. {
  131. ptWndPos.x = (LONG)wParam;
  132. ptWndPos.y = (LONG)lParam;
  133. return (ERROR_SUCCESS);
  134. }
  135. static
  136. LRESULT
  137. MainWnd_CLEAR_DLG (
  138. IN HWND hWnd,
  139. IN WPARAM wParam,
  140. IN LPARAM lParam // dlg exit value
  141. )
  142. /*++
  143. Routine Description:
  144. Called by a dialog box to clear the previous dialog.
  145. Arguments:
  146. IN HWND hWnd
  147. main window handle
  148. IN WPARAM wParam,
  149. mot used
  150. IN LPARAM lParam
  151. dlg box exit value
  152. Return Value:
  153. ERROR_SUCCESS
  154. --*/
  155. {
  156. if (hwndDisplay != NULL) {
  157. EndDialog (hwndDisplay, lParam);
  158. hwndDisplay = NULL;
  159. }
  160. return ERROR_SUCCESS;
  161. }
  162. static
  163. LRESULT
  164. MainWnd_REGISTER_DLG (
  165. IN HWND hWnd,
  166. IN WPARAM wParam, // help context ID
  167. IN LPARAM lParam // handle to dialog to register
  168. )
  169. /*++
  170. Routine Description:
  171. external message sent by dialog boxes when they initialize.
  172. This message and the CLEAR_DLG message above are used to
  173. overlap dialog boxes to prevent "dead" space between dialogs
  174. Arguments:
  175. IN HWND hWnd
  176. main window handle
  177. IN WPARAM wParam
  178. help context ID for dialog
  179. IN LPARAM lParam
  180. handle to dialog box window to register
  181. Return Value:
  182. ERROR_SUCCESS
  183. --*/
  184. {
  185. hwndDisplay = (HWND)lParam;
  186. dwHelpContextId = (DWORD)wParam;
  187. UpdateWindow (hwndDisplay);
  188. return ERROR_SUCCESS;
  189. }
  190. BOOL
  191. RegisterMainWindowClass(
  192. IN HINSTANCE hInstance
  193. )
  194. /*++
  195. Routine Description:
  196. Exported function called by main routine to register the
  197. window class used by this module.
  198. Arguments:
  199. IN HINSTANCE hInstance of application
  200. Return Value:
  201. Boolean Status of RegisterClass function
  202. --*/
  203. {
  204. WNDCLASS wc;
  205. LOGBRUSH lbBackBrush;
  206. lbBackBrush.lbStyle = BS_SOLID;
  207. lbBackBrush.lbColor = RGB(0,0,255);
  208. lbBackBrush.lbHatch = 0;
  209. // Fill in window class structure with parameters that describe the
  210. // main window.
  211. wc.style = CS_HREDRAW | CS_VREDRAW;// Class style(s).
  212. wc.lpfnWndProc = (WNDPROC)MainWndProc; // Window Procedure
  213. wc.cbClsExtra = 0; // No per-class extra data.
  214. wc.cbWndExtra = MAINWND_EXTRA_BYTES; // amount of Window extra data.
  215. wc.hInstance = hInstance; // Owner of this class
  216. wc.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(NCDU_APP_ICON)); // Icon name
  217. wc.hCursor = LoadCursor(NULL, IDC_ARROW);// Cursor
  218. wc.hbrBackground = CreateBrushIndirect(&lbBackBrush);// Default back color
  219. wc.lpszMenuName = NULL; // Menu name from .RC
  220. wc.lpszClassName = szAppName; // Name to register as
  221. // Register the window class and return success/failure code.
  222. return (BOOL)RegisterClass(&wc);
  223. }
  224. static
  225. LRESULT
  226. MainWnd_WM_NCCREATE(
  227. IN HWND hWnd
  228. )
  229. /*++
  230. Routine Description:
  231. Processes the WM_NCCREATE message to the main window
  232. Arguments:
  233. IN HWND hWnd
  234. Return Value:
  235. TRUE if all went OK
  236. FALSE if not (which will cause the window creation to fail
  237. --*/
  238. {
  239. hwndMain = hWnd; // load static data
  240. return (LRESULT)TRUE;
  241. }
  242. static
  243. LRESULT
  244. MainWnd_WM_CREATE (
  245. IN HWND hWnd
  246. )
  247. /*++
  248. Routine Description:
  249. Processes the WM_CREATE message to the main window
  250. Arguments:
  251. IN HWND handle to main window
  252. Return Value:
  253. Win32 Status Value:
  254. ERROR_SUCCESS
  255. --*/
  256. {
  257. RECT rDesktop;
  258. // position window off desktop so it can't be seen
  259. GetWindowRect (GetDesktopWindow(), &rDesktop);
  260. SetWindowPos (hWnd,
  261. NULL,
  262. rDesktop.right+1, // locate it off the bottom-rt. corner of screen
  263. rDesktop.bottom+1,
  264. 1, // and make it 1 x 1
  265. 1,
  266. SWP_NOZORDER);
  267. // show first dialog box
  268. PostMessage (hWnd, NCDU_SHOW_SW_CONFIG_DLG, 0, 0);
  269. // display wait cursor until dialog appears
  270. SetCursor(LoadCursor(NULL, IDC_WAIT));
  271. return (LRESULT)ERROR_SUCCESS;
  272. }
  273. static
  274. LRESULT
  275. MainWnd_SHOW_SW_CONFIG_DLG (
  276. IN HWND hWnd
  277. )
  278. /*++
  279. Routine Description:
  280. Called to display the Initial Configuration dialog box. The value
  281. returned by the dialog box is the ID of then next message to
  282. post to the main window.
  283. Arguments:
  284. IN HWND hwnd
  285. Handle to main window
  286. Return Value:
  287. ERROR_SUCCESS
  288. --*/
  289. {
  290. #ifdef TERMSRV
  291. HWND nNextMessage;
  292. nNextMessage = CreateDialog (
  293. (HINSTANCE)GetWindowLongPtr(hWnd, GWLP_HINSTANCE),
  294. MAKEINTRESOURCE(NCDU_SW_CONFIG_DLG),
  295. hWnd,
  296. SwConfigDlgProc);
  297. if (szCommandLineVal[0] != 0x00)
  298. ShowWindow(nNextMessage, SW_HIDE);
  299. else
  300. ShowWindow(nNextMessage, SW_SHOW);
  301. #else // TERMSRV
  302. UINT nNextMessage;
  303. nNextMessage = (UINT)DialogBox (
  304. (HINSTANCE)GetWindowLongPtr(hWnd, GWLP_HINSTANCE),
  305. MAKEINTRESOURCE(NCDU_SW_CONFIG_DLG),
  306. hWnd,
  307. SwConfigDlgProc);
  308. #endif // TERMSRV
  309. return (LRESULT)ERROR_SUCCESS;
  310. }
  311. static
  312. LRESULT
  313. MainWnd_SHOW_TARGET_WS_DLG (
  314. IN HWND hWnd
  315. )
  316. /*++
  317. Routine Description:
  318. Called to display the Target Workstation Config. dialog box. The value
  319. returned by the dialog box is the ID of then next message to
  320. post to the main window.
  321. Arguments:
  322. IN HWND hwnd
  323. Handle to main window
  324. Return Value:
  325. ERROR_SUCCESS
  326. --*/
  327. {
  328. UINT nNextMessage;
  329. nNextMessage = (UINT)DialogBox (
  330. (HINSTANCE)GetWindowLongPtr(hWnd, GWLP_HINSTANCE),
  331. MAKEINTRESOURCE(NCDU_TARGET_WS_DLG),
  332. hWnd,
  333. TargetWsDlgProc);
  334. // PostMessage (hWnd, nNextMessage, 0, 0); called by dialog box
  335. return (LRESULT)ERROR_SUCCESS;
  336. }
  337. static
  338. LRESULT
  339. MainWnd_SHOW_SERVER_CFG_DLG (
  340. IN HWND hWnd
  341. )
  342. /*++
  343. Routine Description:
  344. Called to display the Server Configuration dialog box. The value
  345. returned by the dialog box is the ID of then next message to
  346. post to the main window.
  347. Arguments:
  348. IN HWND hwnd
  349. Handle to main window
  350. Return Value:
  351. ERROR_SUCCESS
  352. --*/
  353. {
  354. UINT nNextMessage;
  355. nNextMessage = (UINT)DialogBox (
  356. (HINSTANCE)GetWindowLongPtr(hWnd, GWLP_HINSTANCE),
  357. MAKEINTRESOURCE(NCDU_SERVER_CFG_DLG),
  358. hWnd,
  359. ServerConnDlgProc);
  360. // PostMessage (hWnd, nNextMessage, 0, 0); called by dialog box
  361. return (LRESULT)ERROR_SUCCESS;
  362. }
  363. static
  364. LRESULT
  365. MainWnd_SHOW_CONFIRM_DLG (
  366. IN HWND hWnd
  367. )
  368. /*++
  369. Routine Description:
  370. Called to display the Configuration Confirmation dialog box. The value
  371. returned by the dialog box is the ID of then next message to
  372. post to the main window.
  373. Arguments:
  374. IN HWND hwnd
  375. Handle to main window
  376. Return Value:
  377. ERROR_SUCCESS
  378. --*/
  379. {
  380. UINT nNextMessage;
  381. nNextMessage = (UINT)DialogBox (
  382. (HINSTANCE)GetWindowLongPtr(hWnd, GWLP_HINSTANCE),
  383. MAKEINTRESOURCE(NCDU_CONFIRM_BOOTDISK_DLG),
  384. hWnd,
  385. ConfirmSettingsDlgProc);
  386. // PostMessage (hWnd, nNextMessage, 0, 0); called by dialog proc
  387. return (LRESULT)ERROR_SUCCESS;
  388. }
  389. static
  390. LRESULT
  391. MainWnd_SHOW_CREATE_DISKS_DLG (
  392. IN HWND hWnd
  393. )
  394. /*++
  395. Routine Description:
  396. Called to display the Create Floppy Disk dialog box. The value
  397. returned by the dialog box is the ID of then next message to
  398. post to the main window.
  399. Arguments:
  400. IN HWND hwnd
  401. Handle to main window
  402. Return Value:
  403. ERROR_SUCCESS
  404. --*/
  405. {
  406. UINT nNextMessage;
  407. nNextMessage = (UINT)DialogBox (
  408. (HINSTANCE)GetWindowLongPtr(hWnd, GWLP_HINSTANCE),
  409. MAKEINTRESOURCE(NCDU_CREATE_INSTALL_DISKS_DLG),
  410. hWnd,
  411. CopyFlopDlgProc);
  412. // PostMessage (hWnd, nNextMessage, 0, 0); called by dialog proc
  413. return (LRESULT)ERROR_SUCCESS;
  414. }
  415. static
  416. LRESULT
  417. MainWnd_SHOW_SHARE_NET_SW_DLG (
  418. IN HWND hWnd
  419. )
  420. /*++
  421. Routine Description:
  422. Called to display the Copy Dist files and Share dialog box. The value
  423. returned by the dialog box is the ID of then next message to
  424. post to the main window.
  425. Arguments:
  426. IN HWND hwnd
  427. Handle to main window
  428. Return Value:
  429. ERROR_SUCCESS
  430. --*/
  431. {
  432. #ifdef TERMSRV
  433. HWND nNextMessage;
  434. nNextMessage = CreateDialog (
  435. (HINSTANCE)GetWindowLongPtr(hWnd, GWLP_HINSTANCE),
  436. MAKEINTRESOURCE(NCDU_SHARE_NET_SW_DLG),
  437. hWnd,
  438. ShareNetSwDlgProc);
  439. if ( szCommandLineVal[0] != 0x00 )
  440. ShowWindow(nNextMessage, SW_HIDE);
  441. else
  442. ShowWindow(nNextMessage, SW_SHOW);
  443. #else // TERMSRV
  444. UINT nNextMessage;
  445. nNextMessage = (UINT)DialogBox (
  446. (HINSTANCE)GetWindowLongPtr(hWnd, GWLP_HINSTANCE),
  447. MAKEINTRESOURCE(NCDU_SHARE_NET_SW_DLG),
  448. hWnd,
  449. ShareNetSwDlgProc);
  450. #endif // TERMSRV
  451. return (LRESULT)ERROR_SUCCESS;
  452. }
  453. static
  454. LRESULT
  455. MainWnd_SHOW_COPYING_DLG (
  456. IN HWND hWnd
  457. )
  458. /*++
  459. Routine Description:
  460. Called to display the Making Boot Floppy dialog box. The value
  461. returned by the dialog box is the ID of then next message to
  462. post to the main window.
  463. Arguments:
  464. IN HWND hwnd
  465. Handle to main window
  466. Return Value:
  467. ERROR_SUCCESS
  468. --*/
  469. {
  470. if (DialogBox (
  471. (HINSTANCE)GetWindowLongPtr(hWnd, GWLP_HINSTANCE),
  472. MAKEINTRESOURCE(NCDU_COPYING_FILES_DLG),
  473. hWnd,
  474. MakeFlopDlgProc) == IDOK) {
  475. // operation completed successfully so return to main menu
  476. PostMessage (hWnd, NCDU_SHOW_SW_CONFIG_DLG, 0, 0);
  477. } else {
  478. // an error ocurred so go back to configuration dialog to see
  479. // if there's something to fix and retry.
  480. PostMessage (hWnd, NCDU_SHOW_CONFIRM_DLG, 0, 0);
  481. }
  482. return (LRESULT)ERROR_SUCCESS;
  483. }
  484. static
  485. LRESULT
  486. MainWnd_SHOW_EXIT_MESSAGE_DLG (
  487. IN HWND hWnd
  488. )
  489. /*++
  490. Routine Description:
  491. Called to display the Exit Messages dialog box. The value
  492. returned by the dialog box is the ID of then next message to
  493. post to the main window.
  494. Arguments:
  495. IN HWND hwnd
  496. Handle to main window
  497. Return Value:
  498. ERROR_SUCCESS
  499. --*/
  500. {
  501. UINT nNextMessage;
  502. nNextMessage = (UINT)DialogBox (
  503. (HINSTANCE)GetWindowLongPtr(hWnd, GWLP_HINSTANCE),
  504. MAKEINTRESOURCE(NCDU_EXIT_MESSAGE_DLG),
  505. hWnd,
  506. ExitMessDlgProc);
  507. PostMessage (hWnd, nNextMessage, 0, 0);
  508. return (LRESULT)ERROR_SUCCESS;
  509. }
  510. static
  511. LRESULT
  512. MainWnd_SHOW_COPY_ADMIN_UTILS (
  513. IN HWND hWnd
  514. )
  515. {
  516. int nNextMessage;
  517. nNextMessage = (int)DialogBox (
  518. (HINSTANCE)GetWindowLongPtr(hWnd, GWLP_HINSTANCE),
  519. MAKEINTRESOURCE(NCDU_COPY_NET_UTILS_DLG),
  520. hWnd,
  521. CopyNetUtilsDlgProc);
  522. // PostMessage (hWnd, nNextMessage, 0, 0);
  523. return (LRESULT)ERROR_SUCCESS;
  524. }
  525. static
  526. LRESULT
  527. MainWnd_WM_ACTIVATEAPP (
  528. IN HWND hWnd,
  529. IN WPARAM wParam,
  530. IN LPARAM lParam
  531. )
  532. /*++
  533. Routine Description:
  534. enables and disables the F1 hot key to be active only
  535. when the app is active (i.e. has focus)
  536. Arguments:
  537. IN HWND hWnd
  538. window handle
  539. IN WPARAM wParam
  540. TRUE when app is being activated
  541. FALSE when app is being deactivated
  542. IN LPARAM lParam
  543. Thread getting focus (if wParam = FALSE)
  544. Return Value:
  545. ERROR_SUCCESS
  546. --*/
  547. {
  548. if ((BOOL)wParam) {
  549. // getting focus so enable hot key
  550. RegisterHotKey (
  551. hWnd,
  552. NCDU_HELP_HOT_KEY,
  553. 0,
  554. VK_F1);
  555. } else {
  556. UnregisterHotKey (
  557. hWnd,
  558. NCDU_HELP_HOT_KEY);
  559. }
  560. return ERROR_SUCCESS;
  561. }
  562. static
  563. LRESULT
  564. MainWnd_WM_HOTKEY (
  565. IN HWND hWnd,
  566. IN WPARAM wParam,
  567. IN LPARAM lParam
  568. )
  569. /*++
  570. Routine Description:
  571. processes hot key messages to call help when f1 is pressed
  572. Arguments:
  573. IN HWND hWnd
  574. window handle
  575. IN WPARAM wParam
  576. id of hotkey pressed
  577. IN LPARAM lParam
  578. Not Used
  579. Return Value:
  580. ERROR_SUCCESS
  581. --*/
  582. {
  583. switch ((int)wParam) {
  584. case NCDU_HELP_HOT_KEY:
  585. ShowAppHelp (
  586. hWnd,
  587. (WORD)(dwHelpContextId & 0x0000FFFF));
  588. return ERROR_SUCCESS;
  589. default:
  590. return DefWindowProc (hWnd, WM_HOTKEY, wParam, lParam);
  591. }
  592. }
  593. static
  594. LRESULT
  595. MainWnd_WM_CLOSE (
  596. IN HWND hWnd
  597. )
  598. /*++
  599. Routine Description:
  600. Processes the WM_CLOSE message to the main window. Closes the key
  601. to the registry if it's open and destroys the window.
  602. Arguments:
  603. IN HWND hWnd
  604. handle to the main window
  605. Return Value:
  606. ERROR_SUCCESS
  607. --*/
  608. {
  609. SetCursor(LoadCursor(NULL, IDC_ARROW)); // reset cursor
  610. if (pAppInfo->hkeyMachine != NULL) RegCloseKey (pAppInfo->hkeyMachine);
  611. SendMessage (hWnd, NCDU_CLEAR_DLG, (WPARAM)hWnd, IDOK);
  612. DestroyWindow (hWnd);
  613. return (LRESULT)ERROR_SUCCESS;
  614. }
  615. static
  616. LRESULT
  617. MainWnd_WM_DESTROY (
  618. IN HWND hWnd
  619. )
  620. /*++
  621. Routine Description:
  622. Processes WM_DESTROY windows message;
  623. Posts Quit message to app.
  624. Arguments:
  625. IN HWND hWnd
  626. Handle to main window
  627. Return Value:
  628. Always 0
  629. --*/
  630. {
  631. #ifdef TERMSRV
  632. if( szHelpFileName[0] != _T('\0') ) {
  633. WinHelp (hWnd, szHelpFileName, HELP_QUIT, 0L);
  634. }
  635. else {
  636. #endif // TERMSRV
  637. WinHelp (hWnd, cszHelpFile, HELP_QUIT, 0L);
  638. #ifdef TERMSRV
  639. }
  640. #endif // TERMSRV
  641. PostQuitMessage (ERROR_SUCCESS);
  642. return (LRESULT)ERROR_SUCCESS;
  643. }
  644. static
  645. LRESULT
  646. MainWnd_WM_NCDESTROY (
  647. HWND hWnd
  648. )
  649. /*++
  650. Routine Description:
  651. Processes WM_NCDESTROY windows message
  652. free's global memory
  653. Arguments:
  654. IN HWND hWnd
  655. Handle to window being destroyed
  656. Return Value:
  657. always ERROR_SUCCESS
  658. --*/
  659. {
  660. return (LRESULT)ERROR_SUCCESS;
  661. }
  662. LRESULT CALLBACK
  663. MainWndProc (
  664. IN HWND hWnd, // window handle
  665. IN UINT message, // type of message
  666. IN WPARAM uParam, // additional information
  667. IN LPARAM lParam // additional information
  668. )
  669. /*++
  670. Routine Description:
  671. Windows Message processing routine for CPS Util application.
  672. Dispatches messages that are processed by this app and
  673. all others are passed to DefWindowProc
  674. Arguments:
  675. Standard WNDPROC api arguments
  676. ReturnValue:
  677. value returned by dispatched function
  678. --*/
  679. {
  680. switch (message) {
  681. case WM_NCCREATE: return (MainWnd_WM_NCCREATE(hWnd));
  682. case WM_CREATE: return (MainWnd_WM_CREATE(hWnd));
  683. case WM_ACTIVATEAPP: return (MainWnd_WM_ACTIVATEAPP(hWnd, uParam, lParam));
  684. case WM_HOTKEY: return (MainWnd_WM_HOTKEY(hWnd, uParam, lParam));
  685. case NCDU_SHOW_SW_CONFIG_DLG: return (MainWnd_SHOW_SW_CONFIG_DLG (hWnd));
  686. case NCDU_SHOW_TARGET_WS_DLG: return (MainWnd_SHOW_TARGET_WS_DLG (hWnd));
  687. case NCDU_SHOW_SERVER_CFG_DLG: return (MainWnd_SHOW_SERVER_CFG_DLG (hWnd));
  688. case NCDU_SHOW_CONFIRM_DLG: return (MainWnd_SHOW_CONFIRM_DLG (hWnd));
  689. case NCDU_SHOW_CREATE_DISKS_DLG: return (MainWnd_SHOW_CREATE_DISKS_DLG (hWnd));
  690. case NCDU_SHOW_SHARE_NET_SW_DLG: return (MainWnd_SHOW_SHARE_NET_SW_DLG (hWnd));
  691. case NCDU_SHOW_COPYING_DLG: return (MainWnd_SHOW_COPYING_DLG (hWnd));
  692. case NCDU_SHOW_EXIT_MESSAGE_DLG: return (MainWnd_SHOW_EXIT_MESSAGE_DLG (hWnd));
  693. case NCDU_SHOW_COPY_ADMIN_UTILS: return (MainWnd_SHOW_COPY_ADMIN_UTILS (hWnd));
  694. case NCDU_CLEAR_DLG: return (MainWnd_CLEAR_DLG (hWnd, uParam, lParam));
  695. case NCDU_REGISTER_DLG: return (MainWnd_REGISTER_DLG (hWnd, uParam, lParam));
  696. case NCDU_UPDATE_WINDOW_POS: return (MainWnd_UPDATE_WINDOW_POS (hWnd, uParam, lParam));
  697. case WM_CLOSE: return (MainWnd_WM_CLOSE(hWnd));
  698. case WM_DESTROY: return (MainWnd_WM_DESTROY(hWnd));
  699. case WM_NCDESTROY: return (MainWnd_WM_NCDESTROY(hWnd));
  700. default: return (DefWindowProc(hWnd, message, uParam, lParam));
  701. }
  702. }