Retrieve column widths for a listview? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
highend
Posts: 47
Joined: 24 Nov 2014, 16:57

Retrieve column widths for a listview?

28 Jul 2016, 01:54

Hi,

how do I get all column widths for an existing listview?
I would like to store them in an .ini file and initialize the listview with them the next time it's displayed (and if the key with these values isn't present, use a few default values)

Setting them isn't difficult (SendMessage, LVM_SETCOLUMNWIDTH, ...) but I don't know how I retrieve their current values (when the user change them manually)...

Code: Select all

#NoEnv

Gui, New
Gui, Add, ListView, w150 h50 hwndListView_hWnd, Pos.|Name|Date
Gui, Show
return

GuiClose:
	; At this place, show all column widths for "the ListView_hWnd" window handle e.g. with "MsgBox, ..."
	ExitApp
return

highend
Posts: 47
Joined: 24 Nov 2014, 16:57

Re: Retrieve column widths for a listview?

28 Jul 2016, 02:40

Thank you, just me!

Getting the number of total columns via ControlGet and looping over this value with SendMessage, LVM_GETCOLUMNWIDTH, A_Index - 1, 0 , ahk_id %hwnd% works fine :)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: inseption86, jaka1, mebelantikjaya and 302 guests