📄 thj60testview.cpp
字号:
// thj60testView.cpp : implementation of the CThj60testView class
//
#include "stdafx.h"
#include "thj60test.h"
#include "thj60testDoc.h"
#include "thj60testView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CThj60testView
IMPLEMENT_DYNCREATE(CThj60testView, CView)
BEGIN_MESSAGE_MAP(CThj60testView, CView)
//{{AFX_MSG_MAP(CThj60testView)
ON_COMMAND(IDM_HtmlHelp, OnHtmlHelp)
ON_COMMAND(IDM_LOOKDLG, OnLookdlg)
ON_WM_HELPINFO()
ON_WM_CONTEXTMENU()
ON_WM_MENUSELECT( )
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CThj60testView construction/destruction
CThj60testView::CThj60testView()
{
// TODO: add construction code here
}
CThj60testView::~CThj60testView()
{
}
BOOL CThj60testView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CThj60testView drawing
void CThj60testView::OnDraw(CDC* pDC)
{
CThj60testDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CThj60testView printing
BOOL CThj60testView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CThj60testView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CThj60testView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CThj60testView diagnostics
#ifdef _DEBUG
void CThj60testView::AssertValid() const
{
CView::AssertValid();
}
void CThj60testView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CThj60testDoc* CThj60testView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CThj60testDoc)));
return (CThj60testDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CThj60testView message handlers
void CThj60testView::OnHtmlHelp()
{
// TODO: Add your command handler code here
// HtmlHelp(NULL, "My_chm.chm::/A_topic.htm", HH_DISPLAY_TOPIC, 0);
AfxMessageBox("call Html Help !");
HtmlHelp(NULL, "MsiHtml0716.chm::/welcome.htm", HH_DISPLAY_TOPIC, 0);
}
void CThj60testView::OnLookdlg()
{
// TODO: Add your command handler code here
CMyDialog ObjDlg0916;
ObjDlg0916.DoModal();
}
BOOL CThj60testView::OnHelpInfo(HELPINFO* pHelpInfo)
{
// TODO: Add your message handler code here and/or call default
//F1
TRACE("entering OnHelpInfo\n");
AfxMessageBox("entering view OnHelpInfo\n");
return CView::OnHelpInfo(pHelpInfo);
}
void CThj60testView::OnContextMenu(CWnd* pWnd, CPoint point)
{ TRACE("Entering OnContextMenu\n");
AfxMessageBox("Entering view OnContextMenu\n");
// TODO: Add your message handler code here
}
//manully add it on Sep.19
void CThj60testView::OnMenuSelect( UINT nItemID, UINT nFlags, HMENU hSysMenu )
{
//AfxMessageBox("Entering CMainFrame::OnMenuSelect\n");
TRACE("CThj60testView::OnMenuSelect: nItemID/n");
CWnd::OnMenuSelect(nItemID, nFlags, hSysMenu);
//TRACE("CMainFrame::OnMenuSelect: nItemID=%d/n",nItemID);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -