//..................................................................................................................... // // About Dlg : Implementation file. // // Copyright (C) 1990, 1999 LEAD Technologies, Inc. // All rights reserved. // //..................................................................................................................... #include "StdSDK.h" #include "about.h" #include "resource.h" //..................................................................................................................... // Function prototypes for About dialog box. //..................................................................................................................... static L_BOOL CALLBACK aboutDlgProc ( HWND hwnd, L_UINT message, WPARAM wParam, LPARAM lParam ) ; //..................................................................................................................... // Function prototypes for message handlers. //..................................................................................................................... static L_BOOL aboutDlg_OnInitDialog ( HWND hwnd, HWND hwndFocus, LPARAM lParam ) ; static L_VOID aboutDlg_OnCommand ( HWND hwnd, L_INT id, HWND hwndCtl, L_UINT codeNotify ) ; static L_BOOL CALLBACK aboutDlgProc ( HWND hwnd, L_UINT message, WPARAM wParam, LPARAM lParam ) { switch ( message ) { // Initialization of controls complete. case WM_INITDIALOG: { return HANDLE_WM_INITDIALOG ( hwnd, wParam, lParam, aboutDlg_OnInitDialog ) ; } // Notification from a control. case WM_COMMAND: { return HANDLE_WM_COMMAND ( hwnd, wParam, lParam, aboutDlg_OnCommand ) ; } } return FALSE ; } static L_BOOL aboutDlg_OnInitDialog (HWND hwnd, HWND hwndFocus, LPARAM lParam ) { UNREFERENCED_PARAMETER ( lParam ) ; UNREFERENCED_PARAMETER ( hwndFocus ) ; // Center the dialog window CenterWindow ( hwnd, NULL ) ; return TRUE ; } static L_VOID aboutDlg_OnCommand ( HWND hwnd, L_INT id, HWND hwndCtl, L_UINT codeNotify ) { UNREFERENCED_PARAMETER ( hwndCtl ) ; UNREFERENCED_PARAMETER ( codeNotify ) ; switch ( id ) { case IDOK: // OK pushbutton/Enter keypress case IDCANCEL: // Esc keypress { EndDialog (hwnd, TRUE) ; // Dismiss the about dialog box } break ; } } L_VOID doAbout ( HWND hwnd ) { HINSTANCE hinst ; hinst = GetWindowInstance ( hwnd ) ; DialogBox ( hinst, MAKEINTRESOURCE ( IDD_ABOUTBOX ), hwnd, ( DLGPROC ) aboutDlgProc ) ; }