Jump to content
  • Advertisement

Archived

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

davekerr

Another MFC Question (CToolBars)

This topic is 6038 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

I have been tearing my hair out trying to find a way to add a toolbar to my derived CToolBarTab control (derived from CTabCtrl). I had the idea that each toolbar could have a tab item, clicking on a tab would show the appropriate toolbar. This was working well until I tested it, and realised I couldn''t get my toolbar into the tab window, below the buttons. I checked the MSDN, all I found was some complecated stuff about resizing client coordinates to make room for a toolbar, in a CDialog, which didn''t help much. I am running out of ideas, and it''s a really big problem now, can anybody help? Thanks in advance!

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
sorry, what I mean is that every time the client class
AddToolbar(UINT uResourceID, CString strTabName)
a new simple structure with a bit of data is added to my CTabToolBar class (derived from CDialogBar). then a new tab item is added to the tab control, which gets streched to fit the dialog resource the client selects when calling CTabToolBar::Create. then when they click on the tab, i wanted the appropriate toolbar to be displayed just under the tab buttons, saving masses of space. i just called CToolBar::Create on the appropriate toolbar, using the actual CTabCtrl as a parent (which is a child of the main CTabToolBar), but nothing ever comes up. i know the correct IDs are used, i''ve stepped through all the code, but i can never get the toolbar to be created as a child of the tab control, just under the buttons. i can''t think what i am doing wrong.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!