mainfrm.cpp

来自「机械手IPC控制器伺服运动程序」· C++ 代码 · 共 79 行

CPP
79
字号
// MainFrm.cpp : implementation file
//

#include "stdafx.h"
#include "alfa.h"
#include "MainFrm.h"
#include "Main.h"
#include "mccl.h"
#include "sys.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CMainFrm dialog


CMainFrm::CMainFrm(CWnd* pParent /*=NULL*/)
	: CDialog(CMainFrm::IDD, pParent)
{
	//{{AFX_DATA_INIT(CMainFrm)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CMainFrm::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CMainFrm)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CMainFrm, CDialog)
	//{{AFX_MSG_MAP(CMainFrm)
	ON_WM_SHOWWINDOW()
	ON_WM_PAINT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMainFrm message handlers

void CMainFrm::OnShowWindow(BOOL bShow, UINT nStatus) 
{
	CDialog::OnShowWindow(bShow, nStatus);
	
	// TODO: Add your message handler code here
	if(bShow==1)
	{
		CMain * main=(CMain *)GetParent();
		main->dlgcur=this;
	}
}

BOOL CMainFrm::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CMainFrm::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
	
	// TODO: Add your message handler code here
	ShowJpeg(&dc,"IDR_BKGROUND","JPEG",15,50);
	CDialog::OnPaint();
	// Do not call CDialog::OnPaint() for painting messages
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?