home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / WINDOWS / PROGRAM / UCB.ZIP / DIALOG.003 < prev    next >
Encoding:
Text File  |  1990-12-03  |  2.9 KB  |  102 lines

  1. \comment       Windows 3.0 Application Script (Version 1.00)
  2. \comment                      
  3. \comment       (C) Copyright DEA Software 1990  All Rights Reserved
  4. \comment 
  5. \comment 
  6. /**************************************************/
  7. \if @[5,10+@[4,2]] <> 2
  8. \skip 1
  9. /*    M O D E L E S S   D I A L O G   B O X       */
  10. \eskip 1
  11. \if @[5,10+@[4,2]] <> 1
  12. \skip 1
  13. /*    M O D A L   D I A L O G   B O X             */
  14. \eskip 1
  15. /**************************************************/
  16.  
  17. /*    @[4,10+@[4,2]]DlgProc Dialog Procedure     */
  18.  
  19. BOOL FAR PASCAL @[4,10+@[4,2]]DlgProc (hDlg, message, wParam, lParam)
  20.  
  21. HWND     hDlg;
  22. unsigned message;
  23. WORD     wParam;
  24. LONG     lParam;
  25. {
  26.   BOOL   bRetVal;      /* Value to be returned to the caller */
  27.  
  28.   switch (message)
  29.     {
  30.       case WM_INITDIALOG:
  31.          return (FALSE);
  32.          break;
  33.  
  34. \if @[5,10+@[4,2]] <> 2    : See if Modeless Dialog Box
  35. \skip 1
  36.       case WM_CLOSE:
  37.          DestroyWindow (hDlg);
  38.          hDlgModeless = NULL;
  39.          break;
  40.  
  41. \eskip 1
  42.       case WM_COMMAND:
  43.          switch (wParam)
  44.            {
  45.  
  46.              /* ----------------------------------------------- */
  47.              /* MODIFY #define ID_OK in .h file to match your   */
  48.              /* DIALOG BOX value                                */
  49.              /* ----------------------------------------------- */
  50.  
  51.              /* User wants to make use of values */
  52.              case ID_OK:
  53. \if @[5,10+@[4,2]] <> 1    : See if Modal Dialog Box
  54. \skip 1
  55.                 EndDialog (hDlg, bRetVal);
  56. \eskip 1
  57. \if @[5,10+@[4,2]] <> 2    : See if Modeless Dialog Box
  58. \skip 1
  59.                 DestroyWindow (hDlg);
  60.                 hDlgModeless = NULL;
  61. \eskip 1
  62.                 return (TRUE);
  63.  
  64.              /* ----------------------------------------------- */
  65.              /* MODIFY #define ID_CANCEL in .h file to match    */
  66.              /* DIALOG BOX value                                */
  67.              /* ----------------------------------------------- */
  68.  
  69.              /* User wants to ignore values */
  70.              case ID_CANCEL:
  71. \if @[5,10+@[4,2]] <> 1    : See if Modal Dialog Box
  72. \skip 1
  73.                 EndDialog (hDlg, bRetVal);
  74. \eskip 1
  75. \if @[5,10+@[4,2]] <> 2    : See if Modeless Dialog Box
  76. \skip 1
  77.                 DestroyWindow (hDlg);
  78.                 hDlgModeless = NULL;
  79. \eskip 1
  80.                 return (TRUE);
  81.  
  82.              /* --------------------------------------------------- */
  83.              /* ADD your code to support other Buttons, Check Boxes */
  84.              /* etc... here.                                        */
  85.              /* --------------------------------------------------- */
  86.  
  87.              /* Tell Windows we did no processing */
  88.              default:
  89.                 return (FALSE);
  90.  
  91.            }
  92.          break;
  93.       default:
  94.          return (FALSE);
  95.          break;
  96.     }
  97.  
  98. }  /* @[4,10+@[4,2]]DlgProc END */
  99.  
  100. \equ @[4,2] = + 1
  101.  
  102.