Re: structures, and tabitem right-click hittest
- Posted by "danielmoyer" <danielmoyer at prodigy.net> Dec 06, 2003
- 607 views
Derek, Appears to work ok if I just use allot rather than W32_allot; is this likely to cause a problem? (Tab index returned is 0 referenced, which is fine) Dan Moyer > > Derek, > > Ok, but what version of Win32Lib has W32_allot in it? I'm using 59.01. > > Dan Moyer > <snip> > > > > > Dan, > > I didn't use the structure library you mentioned. Instead I used the one > built into win32lib and got this result, which didn't crash. > > > > > > constant > > TCHITTESTINFO_ptX = W32_allot( Long ), > > TCHITTESTINFO_ptY = W32_allot( Long ), > > TCHITTESTINFO_flags = W32_allot( UInt ), > > SIZEOF_TCHITTESTINFO = W32_allotted_size() > > > > function rtClickedTab(atom Tab, integer x, integer y) > > atom lHT > > atom lTab > > atom lRC > > > > lHT = acquire_mem(0, SIZEOF_TCHITTESTINFO) > > store(lHT, TCHITTESTINFO_ptX, x) > > store(lHT, TCHITTESTINFO_ptY, y) > > > > lTab = sendMessage(Tab, TCM_HITTEST, 0, lHT) > > lRC = fetch(lHT, TCHITTESTINFO_flags) > > > > release_mem(lHT) > > -- Return both the tab index and where inside the tab the mouse is. > > return {lTab,lRC} > > end function > > > > -- > > Derek > > > > > > TOPICA - Start your own email discussion group. FREE! > > > > > > TOPICA - Start your own email discussion group. FREE! > >