Hallo,
ich bins wieder. Ich verzweifel langsam. Ich möchte nur das bei einer Größenänderung die letzte Spalte vom Listview angepasst wird. Das passiert bis jetzt nur wenn ich die Größe selber mit der Maus verändern, aber es will nicht wenn ich es maximier bzw. wiederherstelle.
Spoiler anzeigen
GUIRegisterMsg($WM_GETMINMAXINFO, "WM_COMMAND")
GUIRegisterMsg($WM_SIZE, "WM_COMMAND")
GUIRegisterMsg($WM_EXITSIZEMOVE, "WM_COMMAND")
...
[/autoit] [autoit][/autoit] [autoit]Global $cListview = GUICtrlCreateListView("PDD|Data Type|Value", 10, 60, 580, 315, -1, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_DOUBLEBUFFER))
GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKRIGHT + $GUI_DOCKTOP + $GUI_DOCKBOTTOM)
For $i = 1 To UBound($aPPOs) - 1
$cItem = GUICtrlCreateListViewItem($aPPOs[$i][0] & "|" & $aPPOs[$i][1], $cListview)
$cContextMenu = GUICtrlCreateContextMenu($cItem)
GUICtrlCreateMenuItem("Set", $cContextMenu)
GUICtrlSetOnEvent(-1, "_SetVar")
Next
_GUICtrlListView_SetColumnWidth($cListview, 0, $LVSCW_AUTOSIZE_USEHEADER)
_GUICtrlListView_SetColumnWidth($cListview, 1, $LVSCW_AUTOSIZE_USEHEADER)
_GUICtrlListView_SetColumnWidth($cListview, 2, $LVSCW_AUTOSIZE_USEHEADER)
...
[/autoit] [autoit][/autoit] [autoit]Func WM_COMMAND($hWnd, $iMsg, $iwParam, $ilParam)
#forceref $hWnd, $iMsg, $iwParam
Local $hWndFrom, $iIDFrom, $iCode
$hWndFrom = $ilParam
$iIDFrom = BitAND($iwParam,0xFFFF)
$iCode = BitShift($iwParam,16)
Switch $hWnd
Case $hGui
Switch $iMsg
Case $WM_GETMINMAXINFO
$strMinMax = DllStructCreate("int;int;int;int;int;int;int;int;int;int", $ilParam)
DllStructSetData($strMinMax, 7, 600 +
DllStructSetData($strMinMax, 8, 400 + 34)
DllStructSetData($strMinMax, 9, @DesktopWidth)
DllStructSetData($strMinMax, 10, @DesktopHeight)
Case $WM_SIZE, $WM_EXITSIZEMOVE
_GUICtrlListView_SetColumnWidth($cListview, 2, $LVSCW_AUTOSIZE_USEHEADER)
EndSwitch
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc
Fehlt da noch was?
Nach Maximieren wird doch eine WM_SIZE versendet.