Skip to main content
GameDev.net gamedev.net
🔒 Locked

texture drop down list

Started by TheMatrixXXX May 29, 2002 at 7:49 AM 5 replies 750+ views
Original Post
TheMatrixXXX
TheMatrixXXX
can you tell me how to create a drop down list with the textures in it? look in worldcraft to know exactly what i mean thx --=[[TheMatrixXXX]]=--
--=[[TheMatrixXXX]]=--
TheMatrixXXX
TheMatrixXXX
hm does no one have an idea?
hm maybe you can also tell me how to draw an image on form when i stored all information already in memory
BITMAPFILEHEADER, BITMAPINFOHEADER and unsigned char *data;
how do draw that on a form?

thx
--=[[TheMatrixXXX]]=--
--=[[TheMatrixXXX]]=--
core
core
Those "drop down lists" are commonly referred to as comboboxes. Searching MSDN would tell you more than I can.

"If people are good only because they fear punishment and hope for reward, then we are a sorry lot indeed." - Albert Einstein
TheMatrixXXX
TheMatrixXXX
yes i know that is called combobox i always say drop down list don´t know why

but what about comboboxes with these images in it?
i know how to use comboboxes but not how to insert my images


--=[[TheMatrixXXX]]=--
--=[[TheMatrixXXX]]=--
TheMatrixXXX
TheMatrixXXX
can no one help me with that ?

--=[[TheMatrixXXX]]=--
--=[[TheMatrixXXX]]=--
pieman
pieman
What I think you want is an owner-draw combo-box. There are 2 flags for this that you can use when creating your combo-box :

CBS_OWNERDRAWFIXED The owner of the list box is responsible for drawing its contents; the items in the list box are all the same height.

CBS_OWNERDRAWVARIABLE The owner of the list box is responsible for drawing its contents; the items in the list box are variable in height.

Either way, you need to handle the WM_DRAWITEM message and draw the contents of the combo-box yourself based on the current state of the combo-box (open/closed, scroll position, where the selection hi-lite is, etc.).

Alternatively, if you''re using MFC you might be able to get away with using CComboBoxEx and an CImageList.


Iain Hutchison
Programmer, Silicon Dreams
The views expressed here are my own, not those of my employer.
Iain HutchisonProgrammer, Silicon DreamsThe views expressed here are my own, not those of my employer.
TheMatrixXXX
TheMatrixXXX
thx for your answer but do you really know what i mean?
i mean a combobox where you have a bitmap on the left and the name on the right (please check out worldcraft if you want to see what i mean)
can you explain how to draw the image data when i already loaded it with my own function ?

thx
--=[[TheMatrixXXX]]=--
--=[[TheMatrixXXX]]=--

Topic Locked

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

Sign in to reply to this topic.