Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Noods

Using tabs (win32)

This topic is 5550 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Im trying to create a window that will have tabs so I can group my output data. I have figured out how to create tabs as a child window, but I cant figure out how to add content each particular tab. Does the content for each tab have to be created in a child window of its respective tab? How do you tell your program to switch content when you select another tab? If you can help, please drop me some code to help me understand. Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Sure I know how to do what you are talking about, I am writing a sample code in MSVC at the moment, ill post it up when im finished.

- BlueDev

Share this post


Link to post
Share on other sites
Thanks a million, I have been fiddling with the MSDN for hours and I cant figure it out!! >.<

Hope to hear from you soon!

Share this post


Link to post
Share on other sites
Ok, now I finished the program and hopefully you are still around to enjoy it!!!

Download Code Here: Tab Control

Hope this helps alot, and if you have more questions about the Tab Conrol, feel free to ask.

- BlueDev

Share this post


Link to post
Share on other sites
THank you so much!!! I have been trying to figure this out for a week!!! Im gonna go read through this now, Ill let you know if I find any more problems

By the way, where did you learn how to do this?

Share this post


Link to post
Share on other sites
Hey, im glad that you''re so excited I was to when I learned, and I have also learned about the Tree Control if you want to learn that someday in the future.

Now to answer your question how I learned all this was the MSDN Library and a lot of R&D (Research and Development) It looks easy but it took me two weeks to learn that and a whole month for the Tree Control so after lots and lots of time stuff just starts forming together and yay it works, hehe. Well, ill do my best to answer any more questions you might have. I know alot about the Tab Control, but not everything

Keep in touch.

- BlueDev

Share this post


Link to post
Share on other sites
I have my first question

I havent been able to compile the code yet, from reading over it, it seems that the code generates a dialog box with tabs, and changes the window name when each tab is selected?

My real question is, I see where the notify message tells the program where to change the name, but how would I:

1) Display items (buttons, fields etc) in a certain tab?
2) Alternate between the actual tab contents when the user changes tabs?

Thanks again for the help!

Share this post


Link to post
Share on other sites
k im about ready to go to bed, so Ill see what I can do to help answer your questions tommorow. Hope to see you then.

- BlueDev

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by Noods
I have my first question

I havent been able to compile the code yet, from reading over it, it seems that the code generates a dialog box with tabs, and changes the window name when each tab is selected?

My real question is, I see where the notify message tells the program where to change the name, but how would I:

1) Display items (buttons, fields etc) in a certain tab?
2) Alternate between the actual tab contents when the user changes tabs?

Thanks again for the help!


I think I can answer your questions. First and foremost understand that the TAB''s interface along with some of the newer interfaces such as the slider control, and spinner controls are literally hacked in. They were extended functionality which appeared in Visual C++ 5.0 and the dialog editor hasn''t gone through a decent re-write since. And believe you me it''s in dire need of one.

Onto your questions. Because of the above rather than being able to select a tab and draw your interface on the tab it self like you can in builder, C# or visual basic you are required to create a seperate dialog for each tab. You create your dialog fill it in with all the appropriate things such as buttons and box''s and the like. Because of this the each tab operates like it''s own dialog box, and requires a dialogproc to recieve any messages from the buttons and other items. Now when you switch tabs you use the createdialogindirect() function and display the correct dialog inside of the tab based on which tab was selected.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!