最佳答案
当然可以的,但你必须建立一个windwos窗口应用项目(windwos application)
然后在程序的(自动生成的):
case WM_DESTROY: {
PostQuitMessage(0);
break;
}
后面加如:
case WM_PAINT: {
HDC dc=GetDC(hwnd);
Arc(dc,100,100,300,300,0,0,100,100);
ReleaseDC(hwnd,dc);
break;
}
你就可以看到一个圆了
追问:
不是VC,是Dev C++
追答:
我上面的就是dev-cpp的,当然不是VC的VC的可以用MFC,而dev-cpp是纯C或C++的你看下建工程
追问:
如果是的话可以把全部代码(源程序)发出来吗?谢谢
追答:
其它代码是自动生成的,全部代码为:#include /* This is where all the input to the window goes to */LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) {switch(Message) {/* Upon destruction, tell the main thread to stop */case WM_DESTROY: {PostQuitMessage(0);break;}case WM_PAINT: {HDC dc=GetDC(hwnd);Arc(dc,100,100,300,300,0,0,1