RE: COMING REAL SOON !
- Posted by Bernie Ryan <xotron at localnet.com> Jul 21, 2001
- 344 views
euman at bellsouth.net wrote: > poke4( tvstruct + TVINSERTSTRUCTITEM_iImage,0) > poke4( tvstruct + TVINSERTSTRUCTITEM_iSelectedImage,1) > > there is no difference in the two languages as for functioning code > (sorta) > > Are you going to take this into consideration, there is a catch in > notifying > the control owner and this is where the second structure come into play. > > if iMsg = TVN_SELCHANGED then --NM_CLICK then -- TreeView > > count = c_func(SendMessage,{id, TVM_GETCOUNT, 0, 0}) > item = c_func(SendMessage,{id,TVM_GETNEXTITEM, 0, > TVGN_ROOT}) > poke4(tvitem + tvitem_hItem,item) > > poke4(tvitem + tvitem_mask,TVIF_TEXT) > poke4(tvitem + tvitem_stateMask, TVIS_SELECTED) > txtbuff = allocate(256) > poke4(tvitem + tvitem_pszText,txtbuff) > poke4(tvitem + tvitem_cchTextMax,256) > > note that the structure used here for the treeview notification is not > the same > as the first > used to create the treeview, it's the second because of its 8 bytes > offset. A > question > I recently asked the list about and its pretty straight forward. How > will your > engine account > for this? Will it be faster than what I already have? I think your talking about the UNION in the TVINSERTSTRUCT structure. I would do this: sequence def def = "hParent: pointer: 1 "& "hInsertAfter: pointer: 1 " if WIN32_IE >= #400 then -- union DUMMYUNIONNAME def &= "itemex : pointer: 1 "& def &= "item : pointer: 1 " else -- single pointer def &= "item : pointer: 1 " end if -- Create the structure WIN32_IE LP_TVINSERTSTRUCT = struc(def) Bernie