Jump to content
Sign in to follow this  

Using Java to move desktop icons

Recommended Posts


I was wondering if it would be possible...

I have been using this function (from AutoItLib):

Func _ListView_SetItemPosition32($hWnd, $iIndex, $iCX, $iCY)
  Local $iPoint, $pPoint, $tPoint, $pMemory, $tMemMap, $iResult

  $tPoint = DllStructCreate($tagPOINT)
  $pPoint = DllStructGetPtr($tPoint)
  DllStructSetData($tPoint, "X", $iCX)
  DllStructSetData($tPoint, "Y", $iCY)
  if _Lib_InProcess($hWnd, $ghLVLastWnd) then
    $iResult = _API_SendMessage($hWnd, $LVM_SETITEMPOSITION32, $iIndex, $pPoint)
    $iPoint  = DllStructGetSize($tPoint)
    $pMemory = _Mem_CtrlInit($hWnd, $iPoint, $tMemMap)
    _Mem_CtrlWrite($tMemMap, $pPoint)
    $iResult = _API_SendMessage($hWnd, $LVM_SETITEMPOSITION32, $iIndex, $pMemory)
  Return $iResult <> 0

EDIT: I want to know because in the interest of learning Java I have decided to try to convert my entire Multiple Desktops program to Java and see how it works...

Edited by Piano_Man

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this