Skip to main content
GameDev.net gamedev.net
๐Ÿ”’ Locked

windows api listbox control

Started by elih1 Oct 5, 2008 at 4:20 AM 0 replies 850+ views
Original Post
elih1
elih1
hello everyone I have a listbox control that is created with windows api CreateWindow, and I have some strings added to it. But, I need for each visible string item in the listbox to have some kind of invisible information(like some number or say ID that i will use in some way in the program logic, I think that is possible in .NET ). How to make this happen or is it possible with windows api? thanks
Cambo_frog
Cambo_frog
Use LB_SETITEMDATA

You may need to cast whatever you pass to LPARAM. You could pass a pointer to a struct or class instance for example.

HTH
For the love of god, please tell me that you've just omitted your error checking code for brevity, and you don't really assume that all those functions succeed.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.