GUI: control types and maximum string lengths Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
User avatar
jeeswg
Posts: 3010
Joined: 19 Dec 2016, 01:58
Location: UK

GUI: control types and maximum string lengths

20 Nov 2017, 20:03

I'm posting here in case anyone has any good links/information on the maximum string lengths for items in the following 8 control types. Thanks.
- ListBox
- ComboBox
- SysListView32
- SysHeader32
- SysTreeView32
- msctls_statusbar32
- ToolbarWindow32
- SysTabControl32
User avatar
jeeswg
Posts: 3010
Joined: 19 Dec 2016, 01:58
Location: UK

Re: GUI: control types and maximum string lengths  Topic is solved

23 Nov 2017, 20:17

One piece of information:
SB_GETTEXT message (Windows)
https://msdn.microsoft.com/en-us/library/windows/desktop/bb760749(v=vs.85).aspx
This message returns a maximum of 65,535 characters. If the text string is longer than that, it is truncated.

I did some tests, the main conclusions were:
- You can display 5460 characters fine (5641 if include the null) in all 8 control types, beyond that, some controls display blanks (listviews/listview headers/treeviews continue to display fine).
- You can retrieve 65534 (65535 if include the null) characters from one of the items (parts) in a status bar control. The documentation suggests that this is the maximum number of characters you can get, but that you can set a larger number.
- It is not clear what the actual limits of these control types are.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


Return to “Ask For Help”

Who is online

Users browsing this forum: burton2, gregster, John316 and 46 guests