procedure buildAWindow;<br>begin<br> { ** Register Custom WndClass ** }<br> Inst := hInstance;<br> with WinClass do<br> begin<br> style := CS_CLASSDC or CS_PARENTDC;<br> lpfnWndProc := @WindowProc;<br> hInstance := Inst;<br> hbrBackground := color_btnface + 1;<br> lpszClassname := 'className';<br> hCursor := LoadCursor(0, IDC_ARROW);<br> end; { with }<br> RegisterClass(WinClass);<br> { ** Create Main Window ** }<br> Handle := CreateWindowEx(WS_EX_APPWINDOW,'className', 'caption',<br> WS_VISIBLE //可见<br> or WS_SYSMENU //系统按钮<br> or WS_MAXIMIZEBOX //最大化按钮许可<br> or WS_MINIMIZEBOX //最小化按钮许可<br> or WS_SIZEBOX, //尺寸可调窗口<br> 10, 10, 500, 350, 0, 0, Inst, nil);<br>//R := ClientRect;<br> R.Left:=20;<br> R.Right:=40;<br> R.Top:=20;<br> R.Bottom:=60;<br>P.x:=20;<br>P.y:=30;<br>P1.X:=80;<br>P1.Y:=100;<br>//===========================================<br>DrawEdge(Handle, R, BDR_RAISEDINNER, BF_RECT);<br>// 这两个都不好用啊?<br>FillRect(Handle, R, 12);<br>//===========================================<br> UpdateWindow(Handle);<br>end;