Re: COMING REAL SOON !

new topic     » goto parent     » topic index » view thread      » older message » newer message

Bernie you must think Im arguing with you, Im not!
I think you have a fantastic idea just curious is all.

Looking at these two structures there is a difference
hParent and hInsertAfter are declared in one not the other

constant
    TVINSERTSTRUCT_hParent = 0,
    TVINSERTSTRUCT_hInsertAfter = 4,
    TVINSERTSTRUCTITEM_mask = 8,
    TVINSERTSTRUCTITEM_hItem = 12,
    TVINSERTSTRUCTITEM_state = 16,
    TVINSERTSTRUCTITEM_stateMask = 20,
    TVINSERTSTRUCTITEM_pszText = 24,
    TVINSERTSTRUCTITEM_cchTextMax = 28,
    TVINSERTSTRUCTITEM_iImage = 32,
    TVINSERTSTRUCTITEM_iSelectedImage = 36,
    TVINSERTSTRUCTITEM_cChildren = 40,
    TVINSERTSTRUCTITEM_lParam = 44,
    SIZEOF_tvstruct = 48

global constant
    tvitem_mask = 0,
    tvitem_hItem = 4,
    tvitem_state = 8,
    tvitem_stateMask = 12,
    tvitem_pszText = 16,
    tvitem_cchTextMax = 20,
    tvitem_iImage = 24,
    tvitem_iSelectedImage = 28,
    tvitem_cChildren = 32,
    tvitem_lParam = 36,
    SIZEOF_tvitem = 40


in another language would be used like this:

  mov tvinsert.hParent,NULL
  mov tvinsert.hInsertAfter,TVI_ROOT
  mov tvinsert.item.imask,TVIF_TEXT+TVIF_IMAGE+TVIF_SELECTEDIMAGE
  mov tvinsert.item.pszText,offset Parent
  mov tvinsert.item.iImage,0
  mov tvinsert.item.iSelectedImage,1

and Euphoria:

  tvstruct = allocate_struct( SIZEOF_tvstruct )
  poke4( tvstruct + TVINSERTSTRUCT_hParent,NULL)
  poke4( tvstruct + TVINSERTSTRUCT_hInsertAfter,TVI_ROOT)
  poke4( tvstruct +
TVINSERTSTRUCTITEM_mask,or_all({TVIF_TEXT+TVIF_IMAGE+TVIF_SELECTEDIMAGE}))
  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?

Good luck Bernie,

Euman
euman at bellsouth.net

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu