Page 1 of 1

[Implemented] LVFINDINFO structure needed for ListIconGadget

Posted: Thu Aug 05, 2004 1:08 pm
by PB
Hi, I need the LVFINDINFO structure to be supported so that I can search a
ListIconGadget for an entry. Or, does anyone know how to do this already?
Here's some API code that would do the trick if the structure was supported:

Code: Select all

a$="target"
FindTopic.LVFINDINFO ; <-- Compiler says 'Structure not found'
FindTopic\flags=#LVFI_STRING
FindTopic\psz=@a$
p=SendMessage_(hWnd,#LVM_FINDITEM,-1,FindTopic)
Debug "target was found at index position "+Str(p)
UPDATE: I just realised I could do a FindString search on each ListIconGadget item:

Code: Select all

a$="target"
For a=0 To CountGadgetItems(#gadget)-1
  If FindString(GetGadgetItemText(#gadget,a,0),a$,1)<>0 : p=a : Break : EndIf
Next
Debug "target was found at index position "+Str(p)
But it would still be nice to have this structure added. ;)

Posted: Thu Aug 05, 2004 1:21 pm
by Edwin Knoppert
Structure viewer shows:
LV_FINDINFO


Structure LV_FINDINFO
flags.l
psz.l
lParam.l
pt.POINT
vkDirection.l
EndStructure

Posted: Thu Aug 05, 2004 1:24 pm
by PB
> Structure viewer shows:
> LV_FINDINFO

But as you can see from my post, the compiler can't find it... don't know why.

Posted: Thu Aug 05, 2004 2:29 pm
by Edwin Knoppert
I posted my reply because of the underscore.

Am i incorrect?

Posted: Thu Aug 05, 2004 2:36 pm
by blueb
I've never known you to be wrong! :D

P.S. - I like the icon to PBDev.... maybe more users will try it and see
that it's a great program.


--blueb

Posted: Fri Aug 06, 2004 8:56 am
by PB
> I posted my reply because of the underscore

Oh my goodness, now I see the light! :)
I didn't notice the underscore before.

Hmm, but why is an underscore there? No wonder I didn't see it in the
structure viewer. All API web sites don't have an underscore for it...

Posted: Fri Aug 13, 2004 12:28 am
by freak
LV_FINDINFO was the old way M$ named their structures, LVFINDINFO is the
new one. The M$ documentation doesn't contain any word about this change, and
since the PB definitions are quite old, they still have that old thing in it.

This applies to many many other structures, so if you don't find the structure
you search for, just try to put an underscore after the 2nd or 3rd letter.

Timo

Posted: Fri Aug 13, 2004 1:36 am
by PB
> if you don't find the structure you search for, just try to put an underscore
> after the 2nd or 3rd letter.

Thanks for the info, Freak! :)