Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding things/views to CTabCtrl Tabs. HELP!!

Status
Not open for further replies.

qedusa

Programmer
Jan 12, 2002
43
US
Hi, I'm a brand new Visual C++ user and I'm having trouble trying to get things in my tab display areas. On some tabs I would like to display 'dialog' style views. On others, I would like to display general information (CScrollView??).
I have created the tabs no problem and can identify tab clicks and selections. I just can't work out how to display stuff in the tab areas.

Is there any simple example code to show me how? Any help would be greatly appreciated.

Many thanks...

Nick
 
One way to do this is to create a separate dialog window that is sized to fit right below the tab edges (the part that sticks out). When the user clicks a particular tab, you create (redraw) the correct dialog for the tab the user has chosen.

Use the OnSize() event to size the tab and the dialog box separately to look like they fit together. Then, use the OnChangeTab() or whatever the actual event is called (I forget) to detect the tab index and then draw, display, and size the correct dialog for that tab.

Hope that helps. ;-)
 
Hi, thanks for that. I think I have it working OK now (or at least it appears to be!). Thnks...

Nick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top