📄 test_huabudlg.cpp
字号:
// test_huabuDlg.cpp : implementation file
//
#include "stdafx.h"
#include "test_huabu.h"
#include "test_huabuDlg.h"
#include <Windows.h>
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTest_huabuDlg dialog
CTest_huabuDlg::CTest_huabuDlg(CWnd* pParent /*=NULL*/)
: CDialog(CTest_huabuDlg::IDD, pParent)
{
ok_1=0;
can_or=FALSE;
//{{AFX_DATA_INIT(CTest_huabuDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}
void CTest_huabuDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CTest_huabuDlg)
DDX_Control(pDX, IDC_MyP, draw);
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CTest_huabuDlg, CDialog)
//{{AFX_MSG_MAP(CTest_huabuDlg)
ON_WM_PAINT()
ON_WM_TIMER()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTest_huabuDlg message handlers
BOOL CTest_huabuDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
CenterWindow(GetDesktopWindow()); // center to the hpc screen
ShowWindow(SW_MAXIMIZE);
// TODO: Add extra initialization here
// CPaintDC dc(this); // device context for painting
GetClientRect(&m_rect);
// CRect rc;
// GetWindowRect(&rc);
// MoveWindow(rc.left,rc.top,rc.right,rc.bottom,TRUE);
pWnd=GetDlgItem(IDC_MyP);
pWnd->MoveWindow(m_rect);
SetTimer(1,200,NULL);
return TRUE; // return TRUE unless you set the focus to a control
}
void CTest_huabuDlg::OnPaint()
{
CPaintDC dc(this); // device context for painting
GetClientRect(&m_rect);
// TODO: Add your message handler code her
CDialog::OnPaint();
// Do not call CDialog::OnPaint() for painting messages
}
void CTest_huabuDlg::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
draw.re_draw();
// Invalidate();
CDialog::OnTimer(nIDEvent);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -