Modify

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#607 closed Bug (Works For Me)

_GUICtrlListView_SetItemSelected Problem

Reported by: Anomalism@… Owned by: Gary
Milestone: Component: Standard UDFs
Version: 3.2.12.0 Severity: None
Keywords: Cc:

Description

In function _GUICtrlListView_SetItemSelected,has memory problem

$pMemory = _MemInit($hWnd, $iSize, $tMemMap)
_MemWrite($tMemMap, $pItem, $pMemory, $iSize)
$iResult = _SendMessage($hWnd, $LVM_SETITEMSTATE, $iIndex, $pItem, 0, "wparam", "ptr")
_MemFree($tMemMap)

Attachments (0)

Change History (3)

comment:1 by Gary, 17 years ago

Resolution: Works For Me
Status: newclosed

Works for me

comment:2 by wraithdu, 17 years ago

Disregarding the fact that it works for you, why, then, go through the trouble of the _MemInit / _MemWrite / _MemFree sequence if you're not going to use the $pMemory structure that it creates? Other functions in that include file use $pMemory. $pItem is used by GUICtrlSendMsg if you pass the function a control ID instead of hWnd. Does that function internally create the same $pMemory struct and use that?

I only ask becuase I'm sure it's there for a reason.

comment:3 by wraithdu, 17 years ago

Oh I remember, I think. I've used this function before when working with the desktop listview. Previously under either XP or Vista (I don't remember which at the moment) it would either not work or crash explorer. Perhaps this was the reason for using $pMemory. I'd have to test again with the change to be sure.

Modify Ticket

Action
as closed The owner will remain Gary.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.