关于API
窗口的LocalExternalFunctions定义如下:
Function ulong GetDC(ulong hwnd) Library "USER32.DLL"
Function Boolean Arc(ulong hwnd, long r1,long r2, long r3, long r4, long a1,long a2,long a3,long a4) Library "GDI32.DLL"
Open事件代码如下:
ulong ll_handle,ll_device
Boolean lb_rtn
long ll_v[8]
ll_handle = handle(w_api1)
ll_device = GetDC (ll_handle)
ll_v[] = {30,40,300,220, 42,123, 180,54}
lb_rtn = Arc(ll_device, ll_v[1],ll_v[2],ll_v[3],ll_v[4],ll_v[5],ll_v[6],ll_v[7],ll_v[8])
为什么还是画不了弧线!
[解决办法]
窗口重绘时会控除原来的绘制信息,所以你看不到,
open事件绘制完后会触发resize事件,在resize事件会导致窗口重绘,
你可以把上面的代码放到resize里面就可以了~~