struct rect { int l,r,t,b; }; struct tag_paint { int hdc; int fErase; struct rect rcPaint; int fRestore; int fIncUpdate; int rgb_1; int rgb_2; int rgb_3; int rgb_4; int rgb_5; int rgb_6; int rgb_7; int rgb_8; }; void DefWindowProc(int hwnd,int msg,int lparam,int wparam); spec_func DefWindowProc; void ExitProcess(int re); spec_func ExitProcess; int BeginPaint(int hwnd,struct tag_paint* p); spec_func BeginPaint; void Ellipse(int hdc,int a,int b,int c,int d); spec_func Ellipse; void EndPaint(int hdc,struct tag_paint* p); spec_func EndPaint; int GetDC(int a); spec_func GetDC; void TextOut(int hdc,int left,int top,byte* str,int len); spec_func TextOut; void ReleaseDC(int hwnd,int hdc); spec_func ReleaseDC; int GetStockObject(int id); spec_func GetStockObject; void MessageBox(int hwnd,byte* title,byte* context,int flag); spec_func MessageBox; int main(int lparam,int wparam,int msg,int hwnd) { if (msg == 16 || msg == 2) { ExitProcess(0); } else if (msg == 15) { struct tag_paint tp; int hdc = BeginPaint(hwnd,addr tp); TextOut(hdc,0,0,"ABC",4); EndPaint(hdc,addr tp); } if (msg == 513) { MessageBox(hwnd,"Cava's first GUI!","Cool~~~",0); } else { DefWindowProc(hwnd,msg,wparam,lparam); } }