moving a listview item

new topic     » topic index » view thread      » older message » newer message

Hi all,
   I've a routine that's supposed to move the icons of a listview, but
it's working very weird.
   Code:
	elsif msg = WM_LBUTTONDOWN then
		Dragging = 1
	elsif msg = WM_LBUTTONUP then
		Dragging = 0
	elsif msg = WM_MOUSEMOVE then
		if Dragging = 1 and getLVSelectedCount(Desktop) > 0 then
			ptrPOINT = acquire_mem(0, SIZEOF_POINT)
			DesktopSelected = getLVSelected(Desktop)
			if fetch(ptrPOINT, ptX) >= 0 and fetch(ptrPOINT, ptY) >= 0 then
				fResult = w32Func(xGetCursorPos,{ptrPOINT})
				fResult = w32Func(xScreenToClient,{Desktop,ptrPOINT})
				store( ptrPOINT, ptX, fetch(ptrPOINT,ptX) )
				store( ptrPOINT, ptY, fetch(ptrPOINT,ptY) )
				fResult = sendMessage(Desktop, LVM_SETITEMPOSITION32,
DesktopSelected[1], ptrPOINT)
			end if
			release_mem( ptrPOINT )
		end if
	end if
      When i click on the icon an try to drag it it doesn't do
anything. Then i click on another one and drags the one that i clicked
first to that place. After that i can freely drag the icon all over the
listview without the button pressed..

=====
Best Regards,
    Guillermo Bonvehi
    AKA: Knixeur - Caballero Rojo

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu