Re: Listview - Adding an item

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

I don't think I could help either but, if you look at my EFFM project
on the RDS site you may be able to get some clues.

Euman


On 30 Jun 2003 at 2:00, Derek Parnell wrote:

> 
> 
> ----- Original Message -----
> From: "Guillermo Bonvehi" <knixeur at speedy.com.ar>
> To: "EUforum" <EUforum at topica.com>
> Sent: Sunday, June 29, 2003 10:42 PM
> Subject: Listview - Adding an item
> 
> 
> > Hi all,
> >     I'm currently trying to add an item to a listview i made using a
> > resource dialog, i think i did it the way it should be done, but
> > it's not working :(
> >     This is what i got:
> >
> > function makeLV_ITEM(sequence items)
> >     atom hwnd
> >     hwnd = allocate(36)
> >     for I = 0 to length(items)-1 do
> >         poke4(hwnd+(I*4),items[I])
> >     end for
> >     return hwnd
> > end function
> >
> > --- This is inside the WM_INITDIALOG event
> >
> >     LPTSTR = allocate_string("Test")
> >
> >     LV_ITEM = makeLV_ITEM({
> >                 or_all({LVIF_TEXT,LVIF_PARAM}),
> >                 0,
> >                 0,
> >                 0,
> >                 0,
> >                 LPTSTR,
> >                 7,
> >                 0,
> >                 0
> >                 })
> >
> >     void = c_func(xSendMessage, {GetDlgItem(hWnd, PANEL1),
> > LVM_INSERTITEM, 0, LV_ITEM})
> >     free(LV_ITEM)
> >     free(LPTSTR)
> >
> > --- End
> >
> > Can any win32 guru tell me where the problem is?
> 
> I do not think I can help you. I have never worked with true dialogs.
> Does GetDlgItem() return the hWnd of the ListView? I also notice that
> the text length is givenas 7 but the text is only 4 bytes.
> 
> --
> Derek

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

Search



Quick Links

User menu

Not signed in.

Misc Menu