home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / com / activedocument / dfv / about.cxx next >
C/C++ Source or Header  |  1995-02-13  |  1KB  |  54 lines

  1. //+---------------------------------------------------------------------------
  2. //
  3. //  Microsoft Windows
  4. //  Copyright (C) Microsoft Corporation, 1992 - 1995.
  5. //
  6. //  File:       about.cxx
  7. //
  8. //  Contents:   implementation for a simple about dialog box
  9. //
  10. //  Classes:    CAbout
  11. //
  12. //  Functions:
  13. //
  14. //  History:    6-08-94   stevebl   Created
  15. //
  16. //----------------------------------------------------------------------------
  17.  
  18. #include <windows.h>
  19. #include "about.h"
  20.  
  21.  
  22. //+---------------------------------------------------------------------------
  23. //
  24. //  Member:     CAbout::DialogProc
  25. //
  26. //  Synopsis:   dialog proc for the About dialog box
  27. //
  28. //  Arguments:  [uMsg]   - message
  29. //              [wParam] - first message parameter
  30. //              [lParam] - second message parameter
  31. //
  32. //  History:    4-12-94   stevebl   Created for MFract
  33. //              6-08-94   stevebl   Stolen from MFract
  34. //
  35. //----------------------------------------------------------------------------
  36.  
  37. BOOL CAbout::DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
  38. {
  39.     switch (uMsg)
  40.     {
  41.     case WM_INITDIALOG:
  42.         return(TRUE);
  43.     case WM_COMMAND:
  44.         if (LOWORD(wParam) == IDOK
  45.             || LOWORD(wParam) == IDCANCEL)
  46.         {
  47.             EndDialog(hwndDlg, TRUE);
  48.             return(TRUE);
  49.         }
  50.     }
  51.     return(FALSE);
  52. }
  53.  
  54.