
Desktop Icons Position Using API?
LVM_GETITEMPOSITION is a message normally used on ListView controls. Has
someone told you you can use it on the desktop? I'm not sure you can, but
even if you could, the first argument of the SendMessage function call should
be the window handle of the ListView, in your case the handle to the desktop,
which you would have to retrieve with the GetDesktopWindow function call.
Lee Weiner
weiner AT fuse DOT net
Quote:
>I would like to know how to retreive desktop icons position using API calls.
>I tried LVM_GETITEMPOSITION but got a problem when tried to pass the
>POINTAPI structure! Looked like this
>Private type POINTAPI
> x as long
> y as long
>end type
>dim ptr as POINTAPI
>dim itmIndex&
>itmindex = 0 'to get the first icon
>Sendmessage(lstviewhwnd, LVM_GETITEMPOSITION, itmIndex, ptr)
>either VB returns an error or explorer cause an illegal operation!
>can anyone tell me what i'm doing wrong please??
>also I would like to now how to retrieve names corresponding to each index
>using LVM_GETITEMTEXT
>any help would be appriciacted, thank you very much!
>gLoBaL-pUnK