📄 mainfrm.h
字号:
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
// mainfrm.h : interface of the CMainFrame class
//
/////////////////////////////////////////////////////////////////////////////
#include "npview.h"
// Array for the toolbar buttons
#if (_WIN32_WCE < 201)
static TBBUTTON g_arCBButtons[] = {
{ 0, ID_FILE_NEW, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0, 0, 0},
{ 1, ID_FILE_OPEN, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0, 0, 1},
{ 2, ID_FILE_SAVE, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0, 0, 2},
{ 0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0, 0, 0, -1},
{ 3, ID_EDIT_CUT, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0, 0, 3},
{ 4, ID_EDIT_COPY, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0, 0, 4},
{ 5, ID_EDIT_PASTE, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0, 0, 5}
};
#endif
#if defined(_WIN32_WCE_PSPC) && (_WIN32_WCE >= 212)
#define NUM_TOOL_TIPS 6
#elif (_WIN32_WCE >= 300)
#define NUM_TOOL_TIPS 7
#endif // _WIN32_WCE
class CMainFrame : public CFrameWnd
{
protected: // create from serialization only
CMainFrame();
DECLARE_DYNCREATE(CMainFrame)
// Attributes
public:
#if(_WIN32_WCE >= 201)
CCeCommandBar m_wndCommandBar;
#endif
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMainFrame)
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CMainFrame();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected: // control bar embedded members
// Generated message map functions
protected:
//{{AFX_MSG(CMainFrame)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
//}}AFX_MSG
#if defined(_WIN32_WCE_PSPC) && (_WIN32_WCE >= 212)
afx_msg void OnCreateDocList(DLNHDR* pNotifyStruct, LRESULT* result);
LPTSTR m_ToolTipsTable[NUM_TOOL_TIPS];
LPTSTR MakeString(UINT stringID);
afx_msg void OnDestroy();
#elif (_WIN32_WCE >= 300)
LPTSTR m_ToolTipsTable[NUM_TOOL_TIPS];
LPTSTR MakeString(UINT stringID);
afx_msg void OnDestroy();
#endif // _WIN32_WCE_PSPC
DECLARE_MESSAGE_MAP()
};
inline CNotepadView* GetApplicationView()
{
CFrameWnd* pFrame = (CFrameWnd*)AfxGetMainWnd();
ASSERT(pFrame);
return (CNotepadView*)(pFrame)->GetActiveView();
}
/////////////////////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -