Click here to Skip to main content
15,895,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How do I introduce or embed a list box in my tool bar using:
1. MFC
2. WIN32API ?
Posted

1 solution

In both cases, you use a standard list box and make is a child control of the toolbar control. In both cases, it can be based, for example, on Windows API SetParent:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633541%28v=vs.85%29.aspx[^].

There is a lot more related to it: how to define window class for a window object, create a window and obtain its handle, etc. You really need to learn now Windows API works.

—SA
 
Share this answer
 
Comments
Gbenbam 1-Feb-14 19:57pm    
Thanks a lot, but am not a baby coder.
I know all those basic. Once again. thanks.
Sergey Alexandrovich Kryukov 1-Feb-14 20:54pm    
Of course you are not a baby coder. You are worse than that, sorry to say so. Still hope you can change your approaches.
Good luck.
—SA
Gbenbam 2-Feb-14 6:54am    
Perhaps you can help me to change my approaches.I suggest you tell me what a baby coder is and what in your own opinion are the right approaches or else I will consider this an insult.If am of the opinion that activities in this forum shd exclude insults.
Sergey Alexandrovich Kryukov 2-Feb-14 12:17pm    
Certainly, trying to. I just copied the words "baby coder" from yours, don't really want to discuss it — there are no such thing as just "coders", not among people and groups doing successful development. On this particular topic: you get an answer according to your question. If you need really useful help, you need to describe at least the essence of the problem. Describe what did you want to achieve, what's expected behavior, what is observed behavior, why do you feel it's wrong. If you have some exceptions, describe steps to reproduce, complete exception information. Comment the points in code related to exception throwing/propagation. Post all what's relevant. See also: http://www.sscce.org.

—SA
Gbenbam 12-Feb-14 8:31am    
Sorry to border I was writing the program that needed to place the listbox but suddenly noticed thag setparent doesn't require cootdinates.Does the list listbox get put in the. next available space or what?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900