home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c480 / 20.ddi / SAMPLES / DIBVIEW / ABOUT.C_ / ABOUT.C
Encoding:
C/C++ Source or Header  |  1993-02-08  |  1.6 KB  |  60 lines

  1. /*************************************************************************
  2.  
  3.       File:  ABOUT.C
  4.  
  5.    Purpose:  Contains the about box's window procedure.
  6.  
  7.  Functions:  AboutDlg
  8.  
  9.   Comments:  Nothing really special here...Put in a separate module
  10.              so it doesn't eat memory when no about box is around.
  11.  
  12.    History:   Date     Reason
  13.  
  14.              6/1/91    Created
  15.  
  16. *************************************************************************/
  17.  
  18. #include "master.h"
  19.  
  20. //---------------------------------------------------------------------
  21. //
  22. // Function:   AboutDlg
  23. //
  24. // Purpose:    About Dialog box message handler.  Does nothing special,
  25. //             except close down when needed.
  26. //
  27. // Parms:      hDlg    == Handle to About dialog box.
  28. //             message == Message to handle.
  29. //             wParam  == Depends on message.
  30. //             lParam  == Depends on message.
  31. //
  32. // History:   Date      Reason
  33. //             6/01/91  Created
  34. //
  35. //---------------------------------------------------------------------
  36.  
  37. BOOL FAR PASCAL __export AboutDlg(HWND hDlg,
  38.                      unsigned message,
  39.                          WORD wParam,
  40.                          LONG lParam)
  41. {
  42.    switch (message)
  43.    {
  44.       case WM_INITDIALOG:
  45.          return (TRUE);
  46.  
  47.       case WM_COMMAND:
  48.          if ((wParam == IDOK) ||       // "OK" box selected?
  49.              (wParam == IDCANCEL))     // System menu close command?
  50.          {
  51.             EndDialog(hDlg, TRUE);     // Exits the dialog box
  52.             return (TRUE);
  53.          }
  54.          break;
  55.     }
  56.     return (FALSE);                    // Didn't process a message
  57. }
  58.  
  59.  
  60.