home *** CD-ROM | disk | FTP | other *** search
/ CICA 1992 November / CICA_MS_Windows_CD-ROM_Walnut_Creek_November_1992.iso / win3 / util / resgauge / about.c next >
C/C++ Source or Header  |  1992-08-20  |  2KB  |  60 lines

  1. // ============================================================================
  2. // about.c -- dialog procedure for the "About..." dialog box.
  3. // ============================================================================
  4.  
  5.  
  6. #include <windows.h>
  7. #include "resgauge.h"
  8.  
  9.  
  10. // ============================================================================
  11. // > > > > > > > > > > > > > > >  code  begins  < < < < < < < < < < < < < < < <
  12. // ============================================================================
  13. // Processes messages for the "About..." dialog box.
  14. // ----------------------------------------------------------------------------
  15. BOOL
  16. CALLBACK
  17. AboutDlgProc(
  18. HWND      hDlg,   // window handle of the dialog
  19. UINT      msg,    // message type
  20. WPARAM    wParam, // 16 bits of information
  21. LPARAM    lParam) // 32 additional bits of information
  22. {
  23.     int   i;
  24.     BOOL  fReturn;
  25.     HFONT hFont;
  26.  
  27.     fReturn = FALSE;
  28.     switch ( msg )
  29.     {
  30.         case WM_INITDIALOG:
  31.             // center the dialog
  32.             CenterDialog(hDlg);
  33.  
  34.             // set the font of the text boxes
  35.             hFont = GetStockObject(ANSI_VAR_FONT);
  36.             SendDlgItemMessage(hDlg, IDOK, WM_SETFONT, (WPARAM) hFont, FALSE);
  37.             for ( i = IDD_ABOUT1; i <= LAST_ABOUT; ++i )
  38.                 SendDlgItemMessage(hDlg, i, WM_SETFONT, (WPARAM) hFont, FALSE);
  39.  
  40.             // tell DefDlgProc() that this message was handled
  41.             fReturn = TRUE;
  42.             break;
  43.  
  44.         case WM_COMMAND:
  45.             if ( (wParam == IDOK) || (wParam == IDCANCEL) )
  46.             {
  47.                 EndDialog(hDlg, TRUE);
  48.                 fReturn = TRUE;
  49.             }
  50.             break;
  51.     }
  52.  
  53.     return(fReturn);
  54. } // AboutDlgProc
  55.  
  56.  
  57. // ==============
  58. // end of about.c
  59. // ==============
  60.