home *** CD-ROM | disk | FTP | other *** search
- /*
- * AboutBox.cpp
- * $Header: /BoundsChecker/Examples/BUGBNCHX/ABOUTBOX.CPP 2 12/13/96 2:20p Stevea $
- *
- * Description:
- * The AboutBox WindProx and message handler implementations.
- *
- * Notes:
- * <implementation notes go here>
- *
- ***********************************************************************
- *
- * Nu-Mega Technologies, Inc.
- * P.O. Box 7780
- * Nashua, NH 03060
- *
- * (c) Copyright 1994, 1995 Nu-Mega Technologies, Inc.
- * ALL RIGHTS RESERVED.
- *
- ***********************************************************************
- *
- **********************************************************************/
- #include "stdafx.h"
- #include "BugBench.h"
- #include "AboutBox.h"
-
- ////////////////////////////////////////////////////////////////////////
- // AboutBox message handlers
-
- BOOL AboutBox_OnInitDialog ( HWND hwndAbout , HWND hwndFocus , LPARAM lParam )
- {
- ::CenterWindow ( hwndAbout ) ;
-
- return ( TRUE ) ;
- }
-
- ///////////////////////////////////////////////////////////
- // Handles WM_COMMAND messages for the AboutBox dialog.
- void AboutBox_OnCommand ( HWND hWnd ,
- int idCmd ,
- HWND hWndCtl ,
- UINT uiCodeNotify )
- {
- switch ( idCmd )
- {
- case IDOK :
- case IDCANCEL :
- EndDialog ( hWnd , 0 ) ;
- break ;
- }
- }
-
- // Handle the close from the AboutBox sys menu.
- void AboutBox_OnSysCommand ( HWND hWnd ,
- UINT idCmd ,
- int xPos ,
- int yPos )
- {
- if ( SC_CLOSE == idCmd )
- {
- EndDialog ( hWnd , 0 ) ;
- }
- }
-
-
-
- ////////////////////////////////////////////////////////////////////////
- // AboutBox main message pump
- BOOL CALLBACK AboutBox_DlgProc ( HWND hDlg ,
- UINT uMsg ,
- WPARAM wParam ,
- LPARAM lParam )
- {
- BOOL fProcessed = TRUE;
-
- switch ( uMsg )
- {
- HANDLE_MSG ( hDlg , WM_INITDIALOG , AboutBox_OnInitDialog ) ;
- HANDLE_MSG ( hDlg , WM_COMMAND , AboutBox_OnCommand ) ;
- HANDLE_MSG ( hDlg , WM_SYSCOMMAND , AboutBox_OnSysCommand ) ;
- default :
- fProcessed = FALSE ;
- break ;
- }
- return ( fProcessed ) ;
- }
-
-
-
-