2013-10-15
展开全部
#include <afxwin.h>
class CMainWnd : public CFrameWnd
{
public:
CMainWnd();
protected:
afx_msg void OnPaint();
DECLARE_MESSAGE_MAP()
};
class DrawApp : public CWinApp
{
public:
virtual BOOL InitInstance()
{
CFrameWnd* p = new CMainWnd;
m_pMainWnd = p;
p->ShowWindow(SW_SHOWNORMAL);
p->UpdateWindow();
return TRUE;
}
};
DrawApp app;
BEGIN_MESSAGE_MAP(CMainWnd, CWnd)
ON_WM_PAINT()
END_MESSAGE_MAP()
CMainWnd::CMainWnd()
{
this->Create(NULL, _T("X"));
}
void CMainWnd::OnPaint()
{
CPaintDC dc(this);
dc.Ellipse(0, 0, 100, 100);
dc.Arc(-50, 0, 50, 100, 25, 93, 25, 7);
dc.Arc(50, 0, 150, 100, 75, 7, 75, 93);
dc.Arc(25, -43, 125, 57, 25, 7, 100, 50);
dc.Arc(-25, -43, 75, 57, 0, 57, 25, 7);
dc.Arc(25, 43, 125, 143, 100, 50, 25, 93);
dc.Arc(-25, 43, 75, 143, 75, 93, 0, 50);
}
class CMainWnd : public CFrameWnd
{
public:
CMainWnd();
protected:
afx_msg void OnPaint();
DECLARE_MESSAGE_MAP()
};
class DrawApp : public CWinApp
{
public:
virtual BOOL InitInstance()
{
CFrameWnd* p = new CMainWnd;
m_pMainWnd = p;
p->ShowWindow(SW_SHOWNORMAL);
p->UpdateWindow();
return TRUE;
}
};
DrawApp app;
BEGIN_MESSAGE_MAP(CMainWnd, CWnd)
ON_WM_PAINT()
END_MESSAGE_MAP()
CMainWnd::CMainWnd()
{
this->Create(NULL, _T("X"));
}
void CMainWnd::OnPaint()
{
CPaintDC dc(this);
dc.Ellipse(0, 0, 100, 100);
dc.Arc(-50, 0, 50, 100, 25, 93, 25, 7);
dc.Arc(50, 0, 150, 100, 75, 7, 75, 93);
dc.Arc(25, -43, 125, 57, 25, 7, 100, 50);
dc.Arc(-25, -43, 75, 57, 0, 57, 25, 7);
dc.Arc(25, 43, 125, 143, 100, 50, 25, 93);
dc.Arc(-25, 43, 75, 143, 75, 93, 0, 50);
}
--
2022-12-05 广告
2022-12-05 广告
图形化编程简单理解为用积木块形式编程,scratch和python也是其中的一种,属于入门级编程,以其简单生动的画面获得无数学生的喜爱,深圳市创客火科技有限公司是一家做教育无人机的公司,旗下有编程无人机,积木无人机及室内外编队,每款飞机含有...
点击进入详情页
本回答由--提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询