|
public function VirtObjWndPos(in win,in vobj,inout out_x,inout out_y)
{
auto hWnd,desc,file,in_x,in_y,vw,vh,outx,outy,z;
win_activate(win);
set_window(win,10);
win_get_info(win,"handle",hWnd);
GUI_map_get_desc(win,vobj,desc,file);
GUI_desc_get_attr(desc,"x",in_x);
GUI_desc_get_attr(desc,"y",in_y);
GUI_desc_get_attr(desc,"width",vw);
GUI_desc_get_attr(desc,"height",vh);
z=ClientToWinCoord(hWnd,in_x,in_y,outx,outy);
out_x=outx+int(vw/2);
out_y=outy+int(vh/2);
}
function virt_obj_get_text(in button,inout txt)
{
auto wind,desc,guifile,aarry[],colwidth,rowheight,x,y,x1,y1,x2,y2,text;
wind=GUI_get_window();
GUI_map_get_desc(wind,button,desc,guifile);
GUI_list_desc_attrs(desc,aarry);
VirtObjWndPos(wind,button,x,y);
x1=x-int(aarry["width"]/2);
y1=y-int(aarry["height"]/2);
x2=x1+aarry["width"];
y2= y1+aarry["height"];
win_get_text(wind,text,x1,y1,x2,y2);
txt= text;
} |
|