home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / devtools / gik2 / ewyio2eu.d2x / EWYBACC.C < prev    next >
Encoding:
C/C++ Source or Header  |  1993-08-04  |  28.4 KB  |  621 lines

  1. /*
  2. GIK/2 1.0.1 EWYBACC.C 5621-432 (C) COPYRIGHT IBM CORP 1993.  ALL RIGHTS RESERVED.  LICENSED MATERIALS - PROPERTY OF IBM.
  3. */
  4. /**********************************************************************/
  5. /*                                                                    */
  6. /*                         MODULE PROLOGUE                            */
  7. /*                                                                    */
  8. /* COMPONENT NAME:   C++ CLASS BROWSER EXAMPLE                        */
  9. /*                                                                    */
  10. /* MODULE NAME:      EWYBACC                                          */
  11. /*                                                                    */
  12. /* DESCRIPTIVE NAME: Custom Dialogs and Routines                      */
  13. /*                                                                    */
  14. /* PURPOSE:                                                           */
  15. /*                                                                    */
  16. /*   This module contains the dialogs and the tree handling functions */
  17. /*   for the C++ class browser example.                               */
  18. /*                                                                    */
  19. /*   The sample code shows, how to drive a diagram from application   */
  20. /*   data.                                                            */
  21. /*                                                                    */
  22. /*   The graphical symbols are linked to the application data by      */
  23. /*   storing a pointer to their data structure.                       */
  24. /*                                                                    */
  25. /*   The application data is linked to the graphical data by storing  */
  26. /*   the symbol handles.                                              */
  27. /*                                                                    */
  28. /* COPYRIGHT:        (C) 1993 IBM Corporation                         */
  29. /*                                                                    */
  30. /* DISCLAIMER OF WARRANTIES.  The following [enclosed] code is        */
  31. /* sample code created by IBM Corporation. This sample code is not    */
  32. /* part of any standard or IBM product and is provided to you solely  */
  33. /* for the purpose of assisting you in the development of your        */
  34. /* applications.  The code is provided "AS IS", without               */
  35. /* warranty of any kind.  IBM shall not be liable for any damages     */
  36. /* arising out of your use of the sample code, even if they have been */
  37. /* advised of the possibility of such damages.                        */
  38. /**********************************************************************/
  39.  
  40. /*--------------------------------------------------------------------*/
  41. /* INCLUDE RELATED DEFINES                                            */
  42. /*--------------------------------------------------------------------*/
  43.  
  44. #define  INCL_DOS                      /* OS/2 definitions            */
  45. #define  INCL_PM                       /* PM definitions              */
  46.  
  47. /*--------------------------------------------------------------------*/
  48. /* HEADER FILES                                                       */
  49. /*--------------------------------------------------------------------*/
  50.  
  51. #include <os2.h>                       /* OS/2 standard header        */
  52. #include <stdio.h>
  53. #include <stdlib.h>
  54. #include <string.h>
  55. #include <malloc.h>
  56. #include <ewyga.h>                     /* GS main header file         */
  57. #include "ewybadf.h"                   /* Generated header file       */
  58. #include "ewybacc.h"                   /* module header               */
  59. #include "ewybarc.h"                   /* resource constants          */
  60. #include "ewybapa.h"                   /* C++ mini parser             */
  61.  
  62. /*--------------------------------------------------------------------*/
  63. /* LOCAL CONSTANTS                                                    */
  64. /*--------------------------------------------------------------------*/
  65. /*--------------------------------------------------------------------*/
  66. /* LOCAL VARIABLES                                                    */
  67. /*--------------------------------------------------------------------*/
  68.  
  69. static CHAR M_szRoot[] = "*TOP*";
  70. static CHAR M_szInvalid[] = "*DUMP*";
  71.  
  72. /*--------------------------------------------------------------------*/
  73. /* LOCAL FUNCTION PROTOTYPES                                          */
  74. /*--------------------------------------------------------------------*/
  75.  
  76. static VOID InitTree(DHND hDiag);
  77. static VOID DeleteTree(DHND hDiag);
  78. static VOID InsertNode(PNODETYPE pParent,PNODETYPE pChild);
  79. static PNODETYPE SearchNode(PNODETYPE pTop,PSZ pszName);
  80. static MRESULT EXPENTRY BrowseDlgProc(HWND hwndDlg,ULONG ulMsg,MPARAM
  81.                                        mp1,MPARAM mp2);
  82.  
  83. /*--------------------------------------------------------------------*/
  84. /* CODE                                                               */
  85. /*--------------------------------------------------------------------*/
  86. /**********************************************************************/
  87. /* BuildTree                                                          */
  88. /*                                                                    */
  89. /* Parameters:                                                        */
  90. /*    DHND      hDiag      (I):    Diagram handle.                    */
  91. /*    PSZ       pszFile    (I):    C++ header file name               */
  92. /*                                                                    */
  93. /* Returns:                                                           */
  94. /*    VOID                                                            */
  95. /*                                                                    */
  96. /* Description:                                                       */
  97. /*    The function builds a new tree for a C++ class hierarchy        */
  98. /**********************************************************************/
  99.  
  100. VOID BuildTree(DHND hDiag,PSZ pszFile)
  101. {
  102.  
  103.   /********************************************************************/
  104.   /* ** init the tree **                                              */
  105.   /********************************************************************/
  106.  
  107.   DeleteTree(hDiag);
  108.   InitTree(hDiag);
  109.  
  110.   /********************************************************************/
  111.   /* ** parse the tree **                                             */
  112.   /********************************************************************/
  113.  
  114.   ParseFile(hDiag, pszFile);
  115.  
  116.   /********************************************************************/
  117.   /* ** ok **                                                         */
  118.   /********************************************************************/
  119.  
  120.   return ;
  121. }
  122.  
  123. /**********************************************************************/
  124. /* InitTree                                                           */
  125. /*                                                                    */
  126. /* Parameters:                                                        */
  127. /*    DHND      hDiag     (I):    Diagram handle.                     */
  128. /*                                                                    */
  129. /* Returns:                                                           */
  130. /*    VOID                                                            */
  131. /*                                                                    */
  132. /* Description:                                                       */
  133. /*    The function initializes a C++ class tree                       */
  134. /**********************************************************************/
  135.  
  136. static VOID InitTree(DHND hDiag)
  137. {
  138.   PNODETYPE        pRoot;              /* root node                   */
  139.   PNODETYPE        pInvalid;           /* for invalid class           */
  140.   PSZ              pszParents[2];      /* parent names                */
  141.   INT              i;
  142.  
  143.   /********************************************************************/
  144.   /* ** allocate and initialize root node **                          */
  145.   /********************************************************************/
  146.  
  147.   pRoot = malloc(sizeof(NODETYPE));
  148.   memset(pRoot, 0, sizeof(NODETYPE));
  149.   strcpy(pRoot->szClassName, M_szRoot);
  150.   pRoot->pszMethods = NULL;
  151.   pRoot->pUpLink = NULL;
  152.   pRoot->pLeftDown = NULL;
  153.   pRoot->pRightDown = NULL;
  154.   pRoot->pLeftSame = NULL;
  155.   pRoot->pRightSame = NULL;
  156.   pRoot->fDisplay = FALSE;
  157.   pRoot->hUpLink = GS_INVALID_SHND;
  158.   for (i = 0; i < MAX_UPLINKS; i++)
  159.   {
  160.     pRoot->hUpLinkMulti[i] = GS_INVALID_SHND;
  161.     pRoot->pUpLinkMulti[i] = NULL;
  162.   }
  163.  
  164.   /********************************************************************/
  165.   /* ** add root node **                                              */
  166.   /********************************************************************/
  167.  
  168.   GsAddSym(hDiag, &pRoot->hSym, NODE, NODE_FORM);
  169.   GsPutPartText(hDiag, pRoot->hSym, NODE_TEXT, pRoot->szClassName);
  170.  
  171.   /********************************************************************/
  172.   /* ** store a pointer to the symbol **                              */
  173.   /********************************************************************/
  174.  
  175.   GsPutSymPointer(hDiag, pRoot->hSym, pRoot);
  176.  
  177.   /********************************************************************/
  178.   /* ** store the root pointer in the diagram **                      */
  179.   /********************************************************************/
  180.  
  181.   GsPutDiagPointerN(hDiag, 0, pRoot);
  182.  
  183.   /********************************************************************/
  184.   /* ** add invalid node **                                           */
  185.   /********************************************************************/
  186.  
  187.   pszParents[0] = M_szRoot;
  188.   pszParents[1] = NULL;
  189.   InsertClass(hDiag, M_szInvalid, pszParents, NULL);
  190.   pInvalid = SearchNode(pRoot, M_szInvalid);
  191.   pInvalid->fDisplay = FALSE;
  192.  
  193.   /********************************************************************/
  194.   /* ** store the invalid pointer in the diagram **                   */
  195.   /********************************************************************/
  196.  
  197.   GsPutDiagPointerN(hDiag, 1, pInvalid);
  198.   return ;
  199. }
  200.  
  201. /**********************************************************************/
  202. /* DeleteTree                                                         */
  203. /*                                                                    */
  204. /* Parameters:                                                        */
  205. /*    DHND      hDiag     (I):    Diagram handle.                     */
  206. /*                                                                    */
  207. /* Returns:                                                           */
  208. /*    VOID                                                            */
  209. /*                                                                    */
  210. /* Description:                                                       */
  211. /*    The function deletes the class tree                             */
  212. /**********************************************************************/
  213.  
  214. static VOID DeleteTree(DHND hDiag)
  215. {
  216.   SHND             hSym;               /* symbol handle               */
  217.   PNODETYPE        pNode;              /* node                        */
  218.  
  219.   /********************************************************************/
  220.   /* ** collect all nodes **                                          */
  221.   /********************************************************************/
  222.  
  223.   GsCollectSym(hDiag, GS_NODE, GS_ANY_SYM, GS_LOWER_FIRST);
  224.   while ((GsGetCollectedSym(hDiag, &hSym) != GSE_COLLECTION_EMPTY))
  225.   {
  226.     if (hSym != GS_INVALID_SHND)
  227.     {
  228.       pNode = NULL;
  229.       GsGetSymPointer(hDiag, hSym, (PVOID)(&pNode));
  230.       if (pNode != NULL)
  231.       {
  232.  
  233.         /**************************************************************/
  234.         /* ** delete the node **                                      */
  235.         /**************************************************************/
  236.  
  237.         if (pNode->pszMethods != NULL)
  238.           free(pNode->pszMethods);
  239.         free(pNode);
  240.       }
  241.     }
  242.   }
  243.  
  244.   /********************************************************************/
  245.   /* ** and now delete all GIK/2 symbols and links **                 */
  246.   /********************************************************************/
  247.  
  248.   GsDeleteAllSym(hDiag);
  249.   GsPutDiagPointerN(hDiag, 0, NULL);
  250.   GsPutDiagPointerN(hDiag, 1, NULL);
  251.   return ;
  252. }
  253.  
  254. /**********************************************************************/
  255. /* InsertClass                                                        */
  256. /*                                                                    */
  257. /* Parameters:                                                        */
  258. /*    DHND      hDiag           (I):   diagram handle                 */
  259. /*    PSZ       pszName         (I):   C++ class name                 */
  260. /*    PSZ       pszParentName[] (I):   names of the parent class(es), */
  261. /*                                     a NULL in the array means      */
  262. /*                                     no more entries                */
  263. /*    PSZ       pszMethods      (I):   pointer to a text buffer which */
  264. /*                                     contains the class methods     */
  265. /*                                                                    */
  266. /* Returns:                                                           */
  267. /*    VOID                                                            */
  268. /*                                                                    */
  269. /* Description:                                                       */
  270. /*    The function inserts the given C++ class                        */
  271. /**********************************************************************/
  272.  
  273. VOID InsertClass(DHND hDiag,PSZ pszName,PSZ pszParentName[],PSZ
  274.                   pszMethods)
  275. {
  276.   PNODETYPE        pClass;             /* class to insert             */
  277.   PNODETYPE        pParent;            /* superclass                  */
  278.   PNODETYPE        pMultiParent;       /* superclass                  */
  279.   PNODETYPE        pRoot;              /* root of tree                */
  280.   PNODETYPE        pInvalid;           /* for invalid superclasses    */
  281.   SHND             hParent;            /* handle of parent symbol     */
  282.   INT              i;
  283.  
  284.   /********************************************************************/
  285.   /* ** get root and invalid node pointers **                         */
  286.   /********************************************************************/
  287.  
  288.   pRoot = NULL;
  289.   pInvalid = NULL;
  290.   GsGetDiagPointerN(hDiag, 0, (PVOID)(&pRoot));
  291.   GsGetDiagPointerN(hDiag, 1, (PVOID)(&pInvalid));
  292.  
  293.   /********************************************************************/
  294.   /* ** allocate and initialize new node **                           */
  295.   /********************************************************************/
  296.  
  297.   pClass = malloc(sizeof(NODETYPE));
  298.   memset(pClass, 0, sizeof(NODETYPE));
  299.   strcpy(pClass->szClassName, pszName);
  300.   pClass->pszMethods = pszMethods;     /* buffer transfer not needed  */
  301.   pClass->fDisplay = TRUE;
  302.   for (i = 0; i < MAX_UPLINKS; i++)
  303.   {
  304.     pClass->hUpLinkMulti[i] = GS_INVALID_SHND;
  305.   }
  306.  
  307.   /********************************************************************/
  308.   /* ** search for superclass **                                      */
  309.   /********************************************************************/
  310.  
  311.   if (pszParentName[0] != NULL)
  312.     pParent = SearchNode(pRoot, pszParentName[0]);
  313.   else
  314.     pParent = pRoot;
  315.   if (pParent == NULL)
  316.     pParent = pInvalid;
  317.   if (pParent == NULL)
  318.     return ;
  319.  
  320.   /********************************************************************/
  321.   /* ** link with other nodes in the tree **                          */
  322.   /********************************************************************/
  323.  
  324.   InsertNode(pParent, pClass);
  325.  
  326.   /********************************************************************/
  327.   /* ** now add GIK/2 symbols and links **                            */
  328.   /********************************************************************/
  329.  
  330.   GsAddSym(hDiag, &pClass->hSym, NODE, NODE_FORM);
  331.   GsAddSym(hDiag, &pClass->hUpLink, LINK, LINK_FORM);
  332.  
  333.   /********************************************************************/
  334.   /* ** connect the class with its superclass **                      */
  335.   /********************************************************************/
  336.  
  337.   GsPutSymTerminal(hDiag, pClass->hUpLink, GS_SOURCE, pParent->hSym);
  338.   GsPutSymTerminal(hDiag, pClass->hUpLink, GS_TARGET, pClass->hSym);
  339.  
  340.   /********************************************************************/
  341.   /* ** set class name **                                             */
  342.   /********************************************************************/
  343.  
  344.   GsPutPartText(hDiag, pClass->hSym, NODE_TEXT, pClass->szClassName);
  345.  
  346.   /********************************************************************/
  347.   /* ** store a pointer to the node **                                */
  348.   /********************************************************************/
  349.  
  350.   GsPutSymPointer(hDiag, pClass->hSym, pClass);
  351.  
  352.   /********************************************************************/
  353.   /* ** store superclass symbol handle **                             */
  354.   /********************************************************************/
  355.  
  356.   if (pClass->pUpLink == NULL)
  357.     hParent = GS_INVALID_SHND;
  358.   else
  359.     hParent = pClass->pUpLink->hSym;
  360.   pClass->hUpLink = hParent;
  361.  
  362.   /********************************************************************/
  363.   /* ** handle multiple inheritance **                                */
  364.   /********************************************************************/
  365.  
  366.   i = 1;
  367.   while (pszParentName[i] != NULL)
  368.   {
  369.     pMultiParent = SearchNode(pRoot, pszParentName[i]);
  370.     if (pMultiParent != NULL)
  371.     {
  372.  
  373.       /****************************************************************/
  374.       /* ** another superclass found ... **                           */
  375.       /****************************************************************/
  376.  
  377.       pClass->pUpLinkMulti[i-1] = pMultiParent;
  378.  
  379.       /****************************************************************/
  380.       /* ** add also a link to this superclass **                     */
  381.       /****************************************************************/
  382.  
  383.       GsAddSym(hDiag, &pClass->hUpLinkMulti[i-1], LINK, LINK_FORM);
  384.       GsPutSymTerminal(hDiag, pClass->hUpLinkMulti[i-1], GS_SOURCE,
  385.          pMultiParent->hSym);
  386.       GsPutSymTerminal(hDiag, pClass->hUpLinkMulti[i-1], GS_TARGET,
  387.          pClass->hSym);
  388.     }
  389.     i++;
  390.   }
  391.   return ;
  392. }
  393.  
  394. /**********************************************************************/
  395. /* InsertNode                                                         */
  396. /*                                                                    */
  397. /* Parameters:                                                        */
  398. /*    PNODETYPE pParent   (I):    parent of node to insert            */
  399. /*    PNODETYPE pNode     (I):    node to insert                      */
  400. /*                                                                    */
  401. /* Returns:                                                           */
  402. /*    VOID                                                            */
  403. /*                                                                    */
  404. /* Description:                                                       */
  405. /*    The function inserts the given node into the class tree         */
  406. /**********************************************************************/
  407.  
  408. static VOID InsertNode(PNODETYPE pParent,PNODETYPE pNode)
  409. {
  410.   PNODETYPE        pNeighbor;
  411.   INT              i;
  412.  
  413.   /********************************************************************/
  414.   /* ** initialize node **                                            */
  415.   /********************************************************************/
  416.  
  417.   pNode->pLeftDown = NULL;
  418.   pNode->pRightDown = NULL;
  419.   pNode->pLeftSame = NULL;
  420.   pNode->pRightSame = NULL;
  421.   pNode->pUpLink = pParent;
  422.   for (i = 0; i < MAX_UPLINKS; i++)
  423.   {
  424.     pNode->pUpLinkMulti[i] = NULL;
  425.   }
  426.  
  427.   /********************************************************************/
  428.   /* ** link with other nodes **                                      */
  429.   /********************************************************************/
  430.  
  431.   if (pParent->pRightDown == NULL)
  432.   {
  433.  
  434.     /******************************************************************/
  435.     /* ** parent has no childs **                                     */
  436.     /******************************************************************/
  437.  
  438.     pParent->pLeftDown = pNode;
  439.     pParent->pRightDown = pNode;
  440.   }
  441.   else
  442.   {
  443.  
  444.     /******************************************************************/
  445.     /* ** parent has at least one child **                            */
  446.     /******************************************************************/
  447.  
  448.     pNeighbor = pParent->pRightDown;
  449.     pNeighbor->pRightSame = pNode;
  450.     pNode->pLeftSame = pNeighbor;
  451.     pParent->pRightDown = pNode;
  452.   }
  453.   return ;
  454. }
  455.  
  456. /**********************************************************************/
  457. /* SearchNode                                                         */
  458. /*                                                                    */
  459. /* Parameters:                                                        */
  460. /*    PNODETYPE pRoot     (I):    root (top) node of the tree         */
  461. /*    PSZ       pszName   (I):    node name to search for             */
  462. /*                                                                    */
  463. /* Returns:                                                           */
  464. /*    PNODETYPE                   pointer to a node                   */
  465. /*                                or NULL for not found               */
  466. /*                                                                    */
  467. /* Description:                                                       */
  468. /*    The function searches for the specified node                    */
  469. /**********************************************************************/
  470.  
  471. static PNODETYPE SearchNode(PNODETYPE pRoot,PSZ pszName)
  472. {
  473.   PNODETYPE        p;
  474.  
  475.   if (pRoot == NULL)
  476.     return  NULL;
  477.  
  478.   /********************************************************************/
  479.   /* ** node found **                                                 */
  480.   /********************************************************************/
  481.  
  482.   if (!strcmp(pRoot->szClassName, pszName))
  483.     return (pRoot);
  484.  
  485.   /********************************************************************/
  486.   /* ** search left children (recursivly) **                          */
  487.   /********************************************************************/
  488.  
  489.   p = SearchNode(pRoot->pLeftDown, pszName);
  490.   if (p != NULL)
  491.     return (p);
  492.  
  493.   /********************************************************************/
  494.   /* ** search right siblings (recursivly) **                         */
  495.   /********************************************************************/
  496.  
  497.   p = SearchNode(pRoot->pRightSame, pszName);
  498.   if (p != NULL)
  499.     return (p);
  500.  
  501.   /********************************************************************/
  502.   /* ** node not found **                                             */
  503.   /********************************************************************/
  504.  
  505.   return  NULL;
  506. }
  507.  
  508. /**********************************************************************/
  509. /* ShowClassMethods                                                   */
  510. /*                                                                    */
  511. /* Parameters:                                                        */
  512. /*    DHND      hDiag           (I):   diagram handle                 */
  513. /*    SHND      hSym            (I):   symbol handle                  */
  514. /*                                                                    */
  515. /* Returns:                                                           */
  516. /*    VOID                                                            */
  517. /*                                                                    */
  518. /* Description:                                                       */
  519. /*    The function brings up a dialog to show the class methods       */
  520. /*    of the given C++ class                                          */
  521. /**********************************************************************/
  522.  
  523. VOID ShowClassMethods(DHND hDiag,SHND hSym)
  524. {
  525.   HWND             hwndClient;         /* client window handle        */
  526.   HMODULE          hmodCustomCode;     /* custom code module          */
  527.   PNODETYPE        pNode;              /* pointer to node data        */
  528.  
  529.   /********************************************************************/
  530.   /* ** get the pointer to the node data **                           */
  531.   /********************************************************************/
  532.  
  533.   pNode = NULL;
  534.   GsGetSymPointer(hDiag, hSym, (PVOID)(&pNode));
  535.   if ((pNode == NULL) || (!pNode->fDisplay))
  536.     return ;
  537.  
  538.   /********************************************************************/
  539.   /* ** get diagram window handle and custom code module handle **    */
  540.   /********************************************************************/
  541.  
  542.   GsGetHwnd(hDiag, GS_WIN_MAIN, FID_CLIENT, 0, &hwndClient);
  543.   GsGetCcModuleHandle(hDiag, &hmodCustomCode);
  544.  
  545.   /********************************************************************/
  546.   /* ** show class methods (MLE edit field) **                        */
  547.   /********************************************************************/
  548.  
  549.   WinDlgBox(HWND_DESKTOP,
  550.             hwndClient,
  551.             BrowseDlgProc,
  552.             hmodCustomCode,
  553.             DID_BROWSE_DIALOG,
  554.             pNode);
  555.   return ;
  556. }
  557.  
  558. /**********************************************************************/
  559. /* BrowseDlgProc                                                      */
  560. /*                                                                    */
  561. /* Parameters:                                                        */
  562. /*    HWND      hwndDlg   (I):    Dialog window handle                */
  563. /*    ULONG     ulMsg     (I):    PM message                          */
  564. /*    MPARAM    mp1       (I):    message parameter 1                 */
  565. /*    MPARAM    mp2       (I):    message parameter 2                 */
  566. /*                                                                    */
  567. /* Returns:                                                           */
  568. /*    MRESULT                                                         */
  569. /*                                                                    */
  570. /* Description:                                                       */
  571. /*   This is the dialog procedure for browsing the class methods.     */
  572. /*   The dialog is invoked, whenever the user double clicks           */
  573. /*   on a node symbol representing a C++ class.                       */
  574. /*                                                                    */
  575. /*   Browsing is done with a readonly MLE field.                      */
  576. /*                                                                    */
  577. /**********************************************************************/
  578.  
  579. static MRESULT EXPENTRY BrowseDlgProc(HWND hwndDlg,ULONG ulMsg,MPARAM
  580.                                        mp1,MPARAM mp2)
  581. {
  582.   static PNODETYPE pNode;              /* pointer to node data        */
  583.  
  584.   switch (ulMsg)
  585.   {
  586.     case  WM_INITDLG :
  587.  
  588.       /****************************************************************/
  589.       /* ** get the pointer to the node data ** ** this was passed as */
  590.       /* a parameter to the dialog procedure **                       */
  591.       /****************************************************************/
  592.  
  593.       pNode = PVOIDFROMMP(mp2);
  594.  
  595.       /****************************************************************/
  596.       /* ** set window title and MLE text **                          */
  597.       /****************************************************************/
  598.  
  599.       WinSetWindowText(hwndDlg,
  600.                        pNode->szClassName);
  601.       if (pNode->pszMethods != NULL)
  602.       {
  603.         WinSendDlgItemMsg(hwndDlg,
  604.                           DID_CLASS_METHODS,
  605.                           MLM_INSERT,
  606.                           MPFROMP(pNode->pszMethods),
  607.                           0);
  608.       }
  609.       return ((MRESULT)0);
  610.     case  WM_CLOSE :
  611.       WinDismissDlg(hwndDlg,
  612.                     FALSE);
  613.       break;
  614.     case  WM_COMMAND :
  615.       break;
  616.     default  :
  617.       return (WinDefDlgProc(hwndDlg, ulMsg, mp1, mp2));
  618.   }
  619.   return ((MRESULT)0);
  620. }
  621.