Hi.

I've been trying to find out a few simple things about the
desktop icon under a point, using API from VB. The only thing is,
although it was mentioned somewhere that LVM_ messages could
access desktop information, all of the VB examples I could find
pertain to ListView controls added onto a VB form.

I have the hwnd of the desktop's SysListView32 and I'm able
to retrieve the number of icons using LVM_GETITEMCOUNT.

But any time I use any of the following I get an invalid page fault
in Explorer (but not my VB app!):

LVM_HITTEST
LVM_SUBITEMHITTEST
LVM_GETITEMRECT
LVM_GETITEMTEXT


Although it would be nice to gain more information,
the crucial information I need about an icon (as the
mouse flies over it) is:
1) Am I over an icon?
2) Is it a folder, shortcut or what?
4) What does the icon's label say
(the thing that I read as I look at it, which a user can
change by rightclicking the icon and selecting rename)


On the would be nice list is:
(If possible) What portion of the icon am I over (Label, Image, etc)
but I can live without it if need be.

I need whatever I use to work in 95,98,Me,Nt,2k
I've been trying all this in VB6 on Win98.

Any and all help in this regard would be vastly appreciated!

Sincerely,
Robison Bryan
[email protected]
InspiredCode.net

PS: Included below are the typical errors it generates.

LVM_GETITEMTEXT causes this:
EXPLORER caused an invalid page fault in
module KERNEL32.DLL at 0167:bff9db5e.

LVM_GETITEMRECT causes this:
EXPLORER caused an invalid page fault in
module COMCTL32.DLL at 0167:82f7f400.

LVM_SUBITEMHITTEST causes this:
EXPLORER caused an invalid page fault in
module COMCTL32.DLL at 0167:82f533f8.