📄 kanalldlg.cpp
字号:
// kanallDlg.cpp : implementation file
//
#include "stdafx.h"
#include "System.h"
#include "kanallDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// kanallDlg dialog
kanallDlg::kanallDlg(CWnd* pParent /*=NULL*/)
: CDialog(kanallDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(kanallDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void kanallDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(kanallDlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(kanallDlg, CDialog)
//{{AFX_MSG_MAP(kanallDlg)
ON_WM_PAINT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// kanallDlg message handlers
void kanallDlg::OnPaint()
{
CPaintDC dc(this); // device context for painting
CBitmap bmp;
bmp.LoadBitmap(IDB_BITMAP2);
// Get the size of the bitmap
BITMAP bmpInfo;
bmp.GetBitmap(&bmpInfo);
// Create an in-memory DC compatible with the
// display DC we're using to paint
CDC dcMemory;
dcMemory.CreateCompatibleDC(&dc);
// Select the bitmap into the in-memory DC
CBitmap *pOldBmp=dcMemory.SelectObject(&bmp);
// if(!m_bStretch.GetCheck())
// {
// Copy the bits from the in-memory DC into the on- // screen DC to actually do the painting
dc.BitBlt(0, 0, bmpInfo.bmWidth, bmpInfo.bmHeight, &dcMemory, 0, 0, SRCCOPY);
//}
// else
// {
//Get Client area
// CRect wndRt;
// this->GetClientRect(&wndRt);
// Stretch and copy the bits from the in-memory DC into the on-
// screen DC to actually do the painting
// dc.StretchBlt(0, 0, wndRt.Width(), wndRt.Height(), &dcMemory, 0, 0, bmpInfo.bmWidth, bmpInfo.bmHeight, SRCCOPY);
// TODO: Add your message handler code here
// Do not call CDialog::OnPaint() for painting messages
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -