mylistbox.cpp
来自「任意点阵字模生成软件源代码」· C++ 代码 · 共 56 行
CPP
56 行
// MyListBox.cpp : implementation file
//
#include "stdafx.h"
#include "screen.h"
#include "MyListBox.h"
#include "mainfrm.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMyListBox
CMyListBox::CMyListBox()
{
}
CMyListBox::~CMyListBox()
{
}
BEGIN_MESSAGE_MAP(CMyListBox, CListBox)
//{{AFX_MSG_MAP(CMyListBox)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMyListBox message handlers
BOOL CMyListBox::PreTranslateMessage(MSG* pMsg)
{
CWnd* pMainWnd=AfxGetApp()->m_pMainWnd;
CMainFrame* pMainFrame=(CMainFrame*)pMainWnd;
// TODO: Add your specialized code here and/or call the base class
if(pMsg->message==WM_KEYDOWN)
{
if(pMsg->wParam==34)//PAGEDOWN
{
pMainFrame->PostMessage(pMsg->message,pMsg->wParam,pMsg->lParam);
return 1;
}
if(pMsg->wParam==33)//PAGEUP
{
pMainFrame->PostMessage(pMsg->message,pMsg->wParam,pMsg->lParam);
return 1;
}
}
return CListBox::PreTranslateMessage(pMsg);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?