Jump to content

Disable Resize of a Listview


Recommended Posts

I played with this a bit, and this does actually work. I'm sure there's a proper way... and I'm sure this isn't it. :P

#include <GUIConstants.au3>

;Global Const $WM_SETCURSOR = 0x0020
Global Const $WM_LBUTTONDOWN = 0x00201

GUICreate('', 220, 120)
$list = GUICtrlCreateListView('heading 1|heading 2|heading 3', 10, 10, 200, 100, -1)
GUICtrlCreateListViewItem('item 1|item 2|item 3', $list)
GUICtrlCreateListViewItem('item 4|item 5|item 6', $list)


While 1
    If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit
    $mmsg = MouseGetCursor()
    $curs = GUIGetCursorInfo()
    If $mmsg = 0 And $curs[4] = $list Then
        ;GUICtrlRecvMsg ($list, $WM_SETCURSOR)  ;couldn't work out the cursor changing issue
        GUICtrlRecvMsg ($list, $WM_LBUTTONDOWN)  ;trash the button down message
Link to comment
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...