Method: VRTooltip#getTextOf
- Defined in:
- lib/vr/vrtooltip.rb
#getTextOf(ttt, maxlength = 1024) ⇒ Object
there is no way to determine the length
241 242 243 244 245 246 247 248 249 250 251 |
# File 'lib/vr/vrtooltip.rb', line 241 def getTextOf(ttt,maxlength=1024) # there is no way to determine the length ti = createTIPTOOLCore buffer = "\0\0\0\0" * (maxlength/4+1) ti[2] = ttt.hwnd ti[3] = ttt.uid ti[9] = buffer tis = ti.pack(WStruct::TOOLINFO) sendMessage WMsg::TTM_GETTEXT,0,tis buffer.gsub!(/\0.*/,'') buffer end |