Jump to content

Search the Community

Showing results for tags 'drag & drop'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Hi all, So, I was following the Help file trying to get the resulting column order after dragging a column header in a listview. I can't seem to get the order after the drag as the results I receive are from before. It's rather odd. Is there a way I can get this information using WM_NOTIFY like in the below example? Thanks for the help! #include <Array.au3> #include <GUIConstantsEx.au3> #include <GuiHeader.au3> #include <GuiListView.au3> #include <WindowsConstants.au3> Global $g_ListView Example() Func Example() Local $hGUI ; Create GUI $hGUI = GUICreate("Header", 400, 300) $g_ListView = GUICtrlCreateListView("Column 1|Column 2|Column 3|Column 4", 0, 0, 400, 300, BitOR($LVS_SHOWSELALWAYS, $LVS_REPORT), BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES, $LVS_EX_INFOTIP, $LVS_REPORT, $LVS_EX_HEADERDRAGDROP)) GUISetState(@SW_SHOW) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE EndFunc ;==>Example Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam Local $hWndFrom, $iCode Local $tNMHDR, $tNMHEADER, $tNMHDFILTERBTNCLICK, $tNMHDDISPINFO $hHwnd = GUICtrlGetHandle($g_ListView) $tNMHDR = DllStructCreate($tagNMHDR, $lParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iCode = DllStructGetData($tNMHDR, "Code") Switch $iCode Case $HDN_ENDDRAG ; Sent by a header control when a drag operation has ended on one of its items ConsoleWrite("!> " & _GUICtrlListView_GetColumnOrder($g_ListView) & @CRLF); <<<<<<<<<<<<<<< This will return the order BEFORE the drop Return False ; To allow the control to automatically place and reorder the item EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY
×
×
  • Create New...