为什么?
Code: Select all
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
import "ecere"
class Form1 : Window
{
text = "Form1";
background = activeBorder;
borderStyle = sizable;
hasMaximize = true;
hasMinimize = true;
hasClose = true;
size = { 576, 432 };
void OnRedraw(Surface surface)
{
HDC hdc;
//PAINTSTRUCT ps;
const POINT polygon[10] = { 30, 145, 85, 165, 105, 110, 65, 125, 30, 105 };
const POINT bezier[4] = {280, 160, 320, 160, 325, 110, 350, 110};
hdc =GetDC(surface.GetDisplay().systemWindow);
//hdc=BeginPaint(surface.GetDisplay(), &ps);
Ellipse(hdc, 50, 50, 120, 90);
RoundRect(hdc, 150, 30, 240, 90, 15, 20);
Chord(hdc, 270, 30, 360, 90, 270, 45, 360, 45);
Polygon(hdc, polygon, 5);
Rectangle(hdc, 150, 110, 230, 160);
PolyBezier(hdc, bezier, 4);
//EndPaint(surface.GetDisplay(), &ps);
}
}
Form1 form1 {};