在hellowrold程序基础上绘制一个圆
只需修改OnPaint方法
LONG OnPaint(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
PAINTSTRUCT ps;
HDC hdc;
RECT rect;
HPEN hpen;
GetClientRect(hWnd,rect);
hdc = BeginPaint(hWnd,ps);
//hpen = GetStockPen(BLACK_PEN); //两种创建画笔的方法
hpen = CreatePen(PS_SOLID,2,RGB(0XFF,0X00,0X00));
HGDIOBJ oldpen = SelectObject(hdc,hpen);
Ellipse(hdc,10,10,200,200);
SelectObject(hdc,oldpen);
DeleteObject(hpen);
EndPaint(hWnd,ps);
return TRUE;
}
关键词: WinCE
![](https://webstorage.eepw.com.cn/images/2014/m/wx.png)
加入微信
获取电子行业最新资讯
搜索微信公众号:EEPW
或用微信扫描左侧二维码