wzddlg.cpp
来自「《vc++扩展编程实例》源码。运用Visual C++ 5.0或6.0的高级编程」· C++ 代码 · 共 77 行
CPP
77 行
// WzdDlg.cpp : implementation file
//
#include "stdafx.h"
#include <afxpriv.h>
#include "wzd.h"
#include "WzdDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CWzdDialog dialog
CWzdDialog::CWzdDialog(CWnd* pParent /*=NULL*/)
: CDialog(CWzdDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CWzdDialog)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CWzdDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CWzdDialog)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CWzdDialog, CDialog)
//{{AFX_MSG_MAP(CWzdDialog)
ON_WM_HELPINFO()
//}}AFX_MSG_MAP
ON_MESSAGE(WM_HELPHITTEST,OnHelpHitTest)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CWzdDialog message handlers
BOOL CWzdDialog::OnHelpInfo(HELPINFO* pHelpInfo)
{
if (pHelpInfo->iContextType == HELPINFO_WINDOW)
{
DWORD helpId = -1;
CWnd* pWnd = GetDlgItem(pHelpInfo->iCtrlId);
if (pWnd)
{
helpId = pWnd->GetWindowContextHelpId();
}
AfxGetApp()->WinHelp(helpId, HELP_CONTEXTPOPUP);
}
// return CDialog::OnHelpInfo(pHelpInfo);
return TRUE;
}
LRESULT CWzdDialog::OnHelpHitTest(WPARAM wParam, LPARAM lParam)
{
DWORD helpId = -1;
// find the window that was clicked
CWnd* pWnd = ChildWindowFromPoint(CPoint(LOWORD(lParam), HIWORD(lParam)),
CWP_SKIPINVISIBLE|CWP_SKIPTRANSPARENT);
if (pWnd)
{
helpId = pWnd->GetWindowContextHelpId();
}
return helpId;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?