readme.wzd
来自「改变视图光标,鼠标变画笔.在VC6.0开发环境下」· WZD 代码 · 共 43 行
WZD
43 行
/////////////////////////////////////////////////////////////////////
// Any class that owns a visible window
/////////////////////////////////////////////////////////////////////
// 1) to change the default cursor for the window, add this to PreCreateWindow()
BOOL CWzdView::PreCreateWindow(CREATESTRUCT& cs)
{
cs.lpszClass = AfxRegisterWndClass(CS_DBLCLKS,
AfxGetApp()->LoadStandardCursor(IDC_CROSS),
(HBRUSH)(COLOR_WINDOW+1),
AfxGetApp()->LoadIcon(IDR_MAINFRAME));
return CView::PreCreateWindow(cs);
}
// 2) to temporarily change the cursor when in a particular mode, add a SetCursor handler
BOOL CWzdView::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
if (m_bDrawMode)
{
SetCursor(AfxGetApp()->LoadCursor(IDC_DRAW_CURSOR));
return TRUE;
}
return CView::OnSetCursor(pWnd, nHitTest, message);
}
// 3) to change the cursor just when mouse pressed, add this to OnLButtonDown
void CWzdView::OnLButtonDown(UINT nFlags, CPoint point)
{
::SetCursor(AfxGetApp()->LoadCursor(IDC_DRAW_CURSOR1));
CView::OnLButtonDown(nFlags, point);
}
/////////////////////////////////////////////////////////////////////
// From: Visual C++ MFC Programming by Example by John E. Swanke
// Copyright (C) 1998 jeswanke. All rights reserved.
/////////////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?