📄 mylistbox.cpp
字号:
// 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -