📄 nthell.wmc
字号:
//Filename: NTHELL.WMC
//"NTHELL" Generated by WindowsMAKER Professional
//Author: Martin Heller
//
// ***********************************************************************
// Do not add code here. Add code in the .CPP file.
//
// This file is maintained by WindowsMAKER Professional.
// As you make changes in your application using WindowsMAKER Professional,
// this file is automatically updated, therefore you never modify this file.
// This file contains member functions and message maps for the classes.
// This is the base classes for the application and main window class.
// This is also the WindowsMAKER common classes which is the basis for common
// WindowsMAKER functionality (eg. menu handling) For more information,
// see the section "How code is generated" in the documentation.
//
// ***********************************************************************
//
// Classes:
// CWinMakerApp
// CWinMakerFrameWnd
// CWinMakerModelessDlg
// CWinMakerModalDlg
// CWinMakerClientDlg
// Cwm_MainBaseWnd
//
//
// ----------------
// | MFC CLASS |
// | |
// ----------------
// |
// ----------------
// | WindowsMAKER | <--- You are here
// | Common Class |
// ----------------
// |
// ----------------
// | WindowsMAKER |
// | Base Class |
// ----------------
// |
// ----------------
// | USER CLASS |
// | |
// ----------------
//*************************************************************
// CLASS: CWinMakerApp
//*************************************************************
// Initialise the app with NO user help
BOOL CWinMakerApp::InitApplication ()
{
return TRUE;
}
// Initialize the instance of the application. This creates the
// main window for the application, and also creates the main window.
// class.
BOOL CWinMakerApp::InitInstance ()
{
// Register new class or get previous
strWndClass = RegisterCustClass ();
if( !strWndClass[0])
return FALSE;
if( pWndMain = new Cwm_MainWnd () )
{
m_pMainWnd = pWndMain;
if( pWndMain->InitWindow (strWndClass) )
{
pWndMain->InitMainMenu ();
pWndMain->ShowWindow (m_nCmdShow);
pWndMain->UpdateWindow ();
return TRUE;
}
}
return FALSE;
}
// register the custom class for this application. This routine
// does not rely on the user for any parameters.
CString CWinMakerApp::RegisterCustClass ()
{
hbrBack = 0;
return AfxRegisterWndClass (
CS_DBLCLKS, // class style
::LoadCursor(NULL,IDC_ARROW), // cursor
(HBRUSH)(COLOR_WINDOW+1),// bkground colour
::LoadIcon(AfxGetInstanceHandle (),"NTHELL")); // Icon
}
// Called just before exit of application
BOOL CWinMakerApp::ExitInstance ()
{
CWinApp::ExitInstance ();
// No processing needed at exit for this design
return TRUE;
}
BOOL CWinMakerApp::PreTranslateMessage(MSG* pMsg)
{
if (pWndClient!=NULL && pWndMain!=NULL && pWndMain->PreTranslateMessage(pMsg))
return TRUE; // trapped by main window (eg: accelerators)
return CWinApp::PreTranslateMessage(pMsg);
}
CWinMakerApp::CWinMakerApp (const char* pName)
: CWinApp (pName)
{
hbrBack =NULL;
pWndClient =NULL;
pWndMain =NULL;
} ;
//*************************************************************
// FUNCTIONS AND MESSAGE MAP FOR CLASS: Cwm_MainBaseWnd
//*************************************************************
// Create the main application window.
inline BOOL Cwm_MainBaseWnd::InitWindow (const char *strClass)
{
// Do the registration ourselves, with no user intervention.
return doCreate (strClass, // window class registered earlier
"WINMAG NT Benchmarks", // window caption
WS_OVERLAPPED | WS_BORDER | WS_SYSMENU | WS_MINIMIZEBOX, // window style
rectDefault, // position rect
(CWnd *)NULL, // pointer to parent window
"MAINMENUBAR"); // menu or child ID
}
// Called just before entering message loop
BOOL Cwm_MainBaseWnd::InitMainMenu ()
{
// No initialization necessary
return TRUE;
}
// This routine loads the accelerator table. WindowsMAKER defines
// its own routine to do this so that more than one set of accelerators
// can be used in an application (MFC only allows one set by default)
BOOL Cwm_MainBaseWnd::LoadAccelTable (const char *szTable)
{
if( m_hAccelTable )
{
FreeResource (m_hAccelTable);
m_hAccelTable = 0;
}
if( szTable )
return CFrameWnd::LoadAccelTable (szTable);
else
return FALSE;
}
// Message Map for class Cwm_MainBaseWnd, decending from class CWinMakerFrameWnd.
BEGIN_MESSAGE_MAP(Cwm_MainBaseWnd, CWinMakerFrameWnd)
// Processing of messages
ON_WM_CREATE()
ON_WM_SETFOCUS()
END_MESSAGE_MAP()
// Message Handling Functions
// windows message function. Dispatches the message to a
// linked function. If you like, you can override this functionality
// in the user class.
int Cwm_MainBaseWnd::OnCreate (LPCREATESTRUCT lpCreateStruct)
{
BLD_MainWinControlsClFunc(this);
return BLD_WM_CREATEMsg(lpCreateStruct);
}
// A routine that processes the WM_SETFOCUS message,
// and sets focus to the client dialog box, if any.
void Cwm_MainBaseWnd::OnSetFocus (CWnd* pOldWnd)
{
if( IsWindow (TheApp.pWndClient->GetSafeHwnd ()) )
TheApp.pWndClient->SetFocus (); // Set Focus to Client
}
//*************************************************************
// CLASS: CWinMakerFrameWnd
//*************************************************************
// Message Map for class CWinMakerFrameWnd, decending from class CFrameWnd.
BEGIN_MESSAGE_MAP(CWinMakerFrameWnd, CFrameWnd)
// Processing menu commands in menu: MAINMENUBAR
ON_COMMAND(IDM_Save, wmIDM_SaveCM)
ON_COMMAND(IDM_Saveas, wmIDM_SaveasCM)
ON_COMMAND(IDM_Print, wmIDM_PrintCM)
ON_COMMAND(IDM_Exit, wmIDM_ExitCM)
ON_COMMAND(IDM_All, wmIDM_AllCM)
ON_COMMAND(IDM_Dhrystone, wmIDM_DhrystoneCM)
ON_COMMAND(IDM_Whetstone, wmIDM_WhetstoneCM)
ON_COMMAND(IDM_Disk, wmIDM_DiskCM)
ON_COMMAND(IDM_Videoalltests, wmIDM_VideoalltestsCM)
ON_COMMAND(IDM_TextScrolling, wmIDM_TextScrollingCM)
ON_COMMAND(IDM_LineDrawing, wmIDM_LineDrawingCM)
ON_COMMAND(IDM_FilledObjects, wmIDM_FilledObjectsCM)
ON_COMMAND(IDM_ColorDisplay, wmIDM_ColorDisplayCM)
ON_COMMAND(IDM_Details, wmIDM_DetailsCM)
ON_COMMAND(IDM_About, wmIDM_AboutCM)
END_MESSAGE_MAP()
//*************************************************************
// CLASS: CWinMakerModelessDlg
//*************************************************************
// Message Map for class CWinMakerModelessDlg, decending from class CDialog.
BEGIN_MESSAGE_MAP(CWinMakerModelessDlg, CDialog)
// Message Map for special message map entries
ON_COMMAND(IDOK,OnOK)
ON_COMMAND(IDCANCEL,OnCancel)
// Processing menu commands in menu: MAINMENUBAR
ON_COMMAND(IDM_Save, wmIDM_SaveCM)
ON_COMMAND(IDM_Saveas, wmIDM_SaveasCM)
ON_COMMAND(IDM_Print, wmIDM_PrintCM)
ON_COMMAND(IDM_Exit, wmIDM_ExitCM)
ON_COMMAND(IDM_All, wmIDM_AllCM)
ON_COMMAND(IDM_Dhrystone, wmIDM_DhrystoneCM)
ON_COMMAND(IDM_Whetstone, wmIDM_WhetstoneCM)
ON_COMMAND(IDM_Disk, wmIDM_DiskCM)
ON_COMMAND(IDM_Videoalltests, wmIDM_VideoalltestsCM)
ON_COMMAND(IDM_TextScrolling, wmIDM_TextScrollingCM)
ON_COMMAND(IDM_LineDrawing, wmIDM_LineDrawingCM)
ON_COMMAND(IDM_FilledObjects, wmIDM_FilledObjectsCM)
ON_COMMAND(IDM_ColorDisplay, wmIDM_ColorDisplayCM)
ON_COMMAND(IDM_Details, wmIDM_DetailsCM)
ON_COMMAND(IDM_About, wmIDM_AboutCM)
END_MESSAGE_MAP()
void CWinMakerModelessDlg::PostNcDestroy()
{
// Make sure destructors are called
delete this;
}
void CWinMakerModelessDlg::OnCancel()
{
// Destroy Window
DestroyWindow();
}
void CWinMakerModelessDlg::OnOK()
{
// Destroy Window
DestroyWindow();
}
//*************************************************************
// CLASS: CWinMakerModalDlg
//*************************************************************
// Message Map for class CWinMakerModalDlg, decending from class CModalDialog.
BEGIN_MESSAGE_MAP(CWinMakerModalDlg, CModalDialog)
// Processing menu commands in menu: MAINMENUBAR
ON_COMMAND(IDM_Save, wmIDM_SaveCM)
ON_COMMAND(IDM_Saveas, wmIDM_SaveasCM)
ON_COMMAND(IDM_Print, wmIDM_PrintCM)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -