Text property of a ListItem in a ListView of another application

Text property of a ListItem in a ListView of another application

Post by stev » Thu, 17 Jul 2003 14:56:17


On Wed, 16 Jul 2003 17:42:02 +1200, "Robert"



just a thought, do you need the VarPtr here

lngLength = modMain.SendMessage(hWnd, LVM_GETITEMTEXT, lngIndex,
VarPtr(objItem))


steve
 
 
 

Text property of a ListItem in a ListView of another application

Post by Tom Es » Thu, 17 Jul 2003 15:49:36

On Wed, 16 Jul 2003 17:42:02 +1200, "Robert"


It won't work like that cross-process. For messages in the WM_USER+
range (which includes comctl msgs) Windows does not marshall the data
ref'd by pointer args into shared mem. You'll need to create and
manage your own shared mem block for the LV_ITEM structure and pass a
pointer to it in lParam. Also just to make things more interesting,
the required technique is different for NT/XP and Win9x. There's a
good example at: http://www.yqcomputer.com/


-Tom
MVP - Visual Basic
(please post replies to the newsgroup)