#include <GUIListView.au3>
#include <WindowsConstants.au3>
GUICreate('不允许拉动表头', 400, 200)
$ListView = GUICtrlCreateListView('Test|aaaaaa|bbbbbbb|ccccc', 5, 5, 390, 150)
_GUICtrlListView_SetColumnWidth($ListView, 0, 120)
GUICtrlCreateListViewItem('1111|2222|333|44444', $ListView)
$hCall = DllCallbackRegister("_ListViewProc", "int", "hWnd;uint;wparam;lparam")
$pCall = DllCallbackGetPtr($hCall)
$hOldC = _WinAPI_SetWindowLong(GUICtrlGetHandle($ListView), -4, $pCall)
GUISetState()
Do
Until guiGetMsg() = -3
GUIDelete()
Func _ListViewProc($hWnd, $iMsg, $wparam, $lparam)
If $iMsg = $WM_NOTIFY Then Return 1
Return _WinAPI_CallWindowProc($hOldC, $hWnd, $iMsg, $wparam, $lparam)
EndFunc ;==>_ListViewProc
|