首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > PB >

用这个代码画线,次次画都是以坐标0.0为起点。所有办法都试过了

2013-01-01 
用这个代码画线,每次画都是以坐标0.0为起点。所有办法都试过了int ii_x,ii_yulong l_handle, l_device strp

用这个代码画线,每次画都是以坐标0.0为起点。所有办法都试过了
int ii_x,ii_y
ulong l_handle, l_device 

strpos pos_zb

ii_x = 1000
ii_y = 1000
pos_zb.xpos=1000
pos_zb.ypos=1000
//SetCapture(handle(This))
l_handle = handle(w_base)
l_device = GetDC(l_handle)
ii_x = unitstopixels(ii_x,XUnitsToPixels!)   
ii_y = unitstopixels(ii_y,yUnitsToPixels!)
ulong newPen
newPen = CreatePen(1,2, rgb(255,0,0)) 

SelectObject(l_device, newPen) 

MoveToEx(l_device,ii_x,ii_y,pos_zb)  
LineTo(GetDC(handle(w_base)),30,20)  



[解决办法]
检查MoveToEx函数是否执行成功

热点排行