69,371
社区成员
发帖
与我相关
我的任务
分享
#include <windows.h>
#include <stdlib.h>
#include <stdio.h>
extern "C"
{
WINBASEAPI HWND WINAPI GetConsoleWindow();
}
int main()
{
HWND hwnd;
HDC hdc;
system("color 3D");
hwnd = GetConsoleWindow();
hdc = GetDC(hwnd);
LineTo(hdc, 200, 300);
Rectangle(hdc, 10, 30, 300, 50);
ReleaseDC(hwnd, hdc);
return 0;
}