📄 testdlg.cpp
字号:
// TestDlg.cpp : implementation file
//
#include "stdafx.h"
#include "Airtime_CE.h"
#include "TestDlg.h"
#include "DBFEngine.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern CDbFile g_dbf;
extern HWND g_hWnd;
/////////////////////////////////////////////////////////////////////////////
// CTestDlg dialog
CTestDlg::CTestDlg(CWnd* pParent /*=NULL*/)
: CDialog(CTestDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CTestDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CTestDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CTestDlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CTestDlg, CDialog)
//{{AFX_MSG_MAP(CTestDlg)
ON_WM_PAINT()
ON_WM_TIMER()
ON_WM_CREATE()
ON_WM_LBUTTONDOWN()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTestDlg message handlers
BOOL CTestDlg::OnInitDialog()
{
CDialog::OnInitDialog();
CenterWindow();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CTestDlg::OnPaint()
{
CPaintDC dc(this); // device context for painting
CRect rect;
GetClientRect(&rect);
dc.DPtoLP(&rect);
CDC MemDC;
CBitmap bmp;
if(!bmp.LoadBitmap(IDB_BESTBOX))
{
//AfxMessageBox(_T("Cann't load bitmap!"));
return;
}
MemDC.CreateCompatibleDC(&dc);
CBitmap *pOldBmp=MemDC.SelectObject(&bmp);
dc.StretchBlt(rect.left,rect.top,rect.right,rect.bottom,&MemDC,0,0,240,320,SRCCOPY);
dc.SelectObject(pOldBmp);
// Do not call CDialog::OnPaint() for painting messages
}
void CTestDlg::OnTimer(UINT nIDEvent)
{
CDialog::OnTimer(nIDEvent);
}
int CTestDlg::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CDialog::OnCreate(lpCreateStruct) == -1)
return -1;
return 0;
}
void CTestDlg::OnLButtonDown(UINT nFlags, CPoint point)
{
EndDialog(1);
::SetActiveWindow(g_hWnd);
::BringWindowToTop(g_hWnd);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -