⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hello.cpp

📁 MFC Windows 程序设计源代码,有实用价值
💻 CPP
字号:
#include <afxwin.h>
#include "Hello.h"
#include "stdafx.h"

CMyApp myApp;

/////////////////////////////////////////////////////////////////////////
// CMyApp member functions

BOOL CMyApp::InitInstance ()
{
    m_pMainWnd = new CMainWindow;
    m_pMainWnd->ShowWindow (m_nCmdShow);

	m_pMainWnd->UpdateWindow ();
    return TRUE;
}

/////////////////////////////////////////////////////////////////////////
// CMainWindow message map and member functions

BEGIN_MESSAGE_MAP (CMainWindow, CFrameWnd)
    ON_WM_PAINT ()
END_MESSAGE_MAP ()

CMainWindow::CMainWindow ()
{
    Create (NULL, _T ("The Hello Application"),WS_OVERLAPPEDWINDOW|WS_VSCROLL,CRect(0,64,354,602));
}

void CMainWindow::OnPaint ()
{
  //  CPaintDC dc (this);
	CPaintDC dc (this);
	
	
    
   CRect rect;
    GetClientRect (&rect);/* 
//	dc.SetROP2(R2_NOT);
//	dc.SetMapMode(MM_LOMETRIC);
//	
	dc.Ellipse(0,0,500,300);
//	dc.SetTextColor(RGB(255,255,0));
//	dc.SetBkColor(RGB(255,0,0));
	//dc.SetBkMode(TRANSPARENT);

    dc.DrawText (_T ("Hello, MFC"), -1, &rect, DT_SINGLELINE | DT_CENTER | DT_VCENTER);
	*/
    dc.SetMapMode(MM_ISOTROPIC);
	dc.SetWindowExt(500,500);
	dc.SetViewportExt(rect.Width(),rect.Height());
    dc.Ellipse(0,0,400,400);
	
	

}

⌨️ 快捷键说明

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