Modify

Opened 16 years ago

Closed 16 years ago

Last modified 16 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 Changed 16 years ago by Gary

  • Resolution set to Works For Me
  • Status changed from new to closed

Works for me

comment:2 Changed 16 years ago by wraithdu

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 Changed 16 years ago by wraithdu

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.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Gary.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.