home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / graphics / audio / midimon / about.c next >
C/C++ Source or Header  |  1997-10-05  |  2KB  |  67 lines

  1. /**************************************************************************
  2.  *
  3.  *  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  4.  *  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  5.  *  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  6.  *  PURPOSE.
  7.  *
  8.  *  Copyright (C) 1993 - 1997  Microsoft Corporation.  All Rights Reserved.
  9.  *
  10.  **************************************************************************/
  11.  
  12. /*
  13.  * about.c - Show the "About" box.
  14.  */
  15.  
  16. #include <windows.h>
  17. #include "about.h"
  18.  
  19.  
  20. /* About - Shows the "About MIDI Monitor" dialog.
  21.  *
  22.  * Params:  hWnd - The application's main window handle.
  23.  *          hInstance - The application's instance handle.
  24.  *
  25.  * Returns: void
  26.  */
  27.  
  28. void About(
  29.   HANDLE  hInstance,
  30.   HWND      hWnd)
  31. {
  32.     DialogBox(hInstance, "About", hWnd, AboutDlgProc);
  33. }
  34.  
  35.  
  36. /* AboutDlgProc - The dialog procedure for the "About MIDI Monitor" dialog.
  37.  *
  38.  * Params:  hDlg - Specifies the associated dialog box.
  39.  *          msg - Specifies the message from the dialog box.
  40.  *        wParam - 32 bits of message-dependent data.
  41.  *          lParam - 32 bits of message-dependent data.
  42.  *
  43.  * Returns: Non-zero if the message is processed, zero otherwise.
  44.  */
  45.  
  46. int FAR PASCAL AboutDlgProc(
  47.   HWND      hDlg,
  48.   UINT      msg,
  49.   WPARAM  wParam,
  50.   LPARAM  lParam)
  51. {
  52.     switch (msg) {
  53.       case WM_INITDIALOG:
  54.         break;
  55.  
  56.       case WM_COMMAND:
  57.         EndDialog(hDlg, TRUE);
  58.         break;
  59.  
  60.       default:
  61.         return FALSE;
  62.         break;
  63.     }
  64.  
  65.     return (TRUE);
  66. }
  67.