[C++]Win32 api Tab Problem

Started by
6 comments, last by Aardvajk 12 years, 9 months ago
Hi,
I created 2 tabs.and i need add checkbox,textbox...etc to them.but as I see we cant add them to directly to tabs.and I searched and I found solition.Solition is create an parent window to tabs area and add checkbox..etc to that window.But how am I going to do that?I searched so much but I didnt find any solition.and I tried it myself but it doen't work.I'm not sure what am I going to do?

Please Help,
Thanks.
Advertisement
As far as I remember, Tab doesn't provide container for each tab.
So you need to create child window as each tab (or called page) as the container, and add controls to the container.
And you need to listen to tab change event, in that hide current active page then show the new page for the new tab.

https://www.kbasm.com -- My personal website

https://github.com/wqking/eventpp  eventpp -- C++ library for event dispatcher and callback list

https://github.com/cpgf/cpgf  cpgf library -- free C++ open source library for reflection, serialization, script binding, callbacks, and meta data for OpenGL Box2D, SFML and Irrlicht.

It would be very helpful if you could tell us what language you are using, any GUI frameworks (if any), what compiler/version, and how your existing control creation code works in general.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

I writed to title.I'm using c++ and I dont use any framework.and I'm usingVisual C++ 2008.and thanks for help.but still my problem isnt gone.Which paramatres I must use?which class name I must use?
I'm sorry, but without any information at all on what you are doing or how you are doing it, there's really nothing we can say. We can't read your mind wink.gif

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

I've played around with the Win32 API Tab thing before and I must say it sucks. Really, really bad. I'd say jump over to Qt or make your own control with MFC because the default one is big letdown and not nice to work with at all.
If I've helped you in any way please push the reputation button, thanks!

Abstraction is my choice of words.
Portfolio: http://www.0x3a.com/
Blog: http://blog.0x3a.com/
I gave up from tab.and I'm doing particle simulator.for that i need interface.But I'm not gonna use it.
Thing to understand, as has been said, is that tab control is not designed to manage the actual pages for you. It is down to you to actually create, destroy, display and hide other windows in response to tab events.

Much of Win32 API is like this. The writers cannot really predict all the possible uses so have to design the library in a way that will provide functionality without overhead in cases where multiple pages are not actually required.

This topic is closed to new replies.

Advertisement