I'm not understanding how to create a "dropdown listbox" window.
I've searched lots of Microsoft pages, but still can't find the answers.
hwndStringSize = CreateWindow
(
TEXT ("LISTBOX"),
NULL,
WS_CHILDWINDOW | WS_VISIBLE,
x, y, // Position
width, height, // width, height,
hwnd,
(HMENU)LB_ADDSTRING,
ghInstance,
NULL
);
How do I specify a "dropdown" box ?
How do I setup the initial values ? (say 1,2,3,4, ..etc)
How do I notify the mother window of a mouse click ? ("case LB_ADDSTRING :" not working)
How do I find out what the user selected in the listbox ?
Any help would be much appreciated.
Dave
Do you mean COMBOBOX ?
Standard Controls: Button, Edit, List Box (http://winprog.org/tutorial/controls.html)
COMBOBOX, LISTBOX and DROPDOWNLISTBOX as well.
Some tutorials :
https://winprog.org/tutorial/controls.html
https://zetcode.com/gui/winapi/advancedcontrols/
Hi DonnyDave,
Quote from: DonnyDave on October 30, 2025, 03:06:04 PMCOMBOBOX, LISTBOX and DROPDOWNLISTBOX as well.
Your request is too broad for a specific answer. You can get a start by using Pelle resource IDE to create the list type you want. Then you use SendMessage to interact with the control.
For an offline help download controls.chm from here:
https://sourceforge.net/projects/windows-controls-api-docs/
Go to the "Control Library" section from there you will see Listbox, and ComboBox entries which show functions, macros, messages etc to use to interact with the control.
Otherwise if you post small examples of where you are 'stuck' doing something, a more focused help would probably be provided.
John Z