Solved

Display in a tab control

Posted on 2000-04-19
5
199 Views
Last Modified: 2013-11-20
HI,
    How to display something in tab control?. In particular how to display any result of a query of a database in different controls. Each and every time one press a different tab the corresponding page must be displayed.

Thanx,
Thiru
0
Comment
Question by:thirumaran
  • 3
5 Comments
 
LVL 1

Expert Comment

by:yarond
ID: 2741917
A regular tab control actually don't contain any or your data-windows. You need to create (by code, or from a template) a different child-dialog for each of your tab page. Then when the tab sends a TCN_SELCHANGE message, you can get the selected tab number (using TabCtrl_GetCurSel, or sending a TCM_GETCURSEL message) and display the appropriate dialog.
0
 
LVL 1

Expert Comment

by:Mensana
ID: 2757104
The best exemple that explains to you how to deal with tab controls can be found at:
http://www.visionx.com/mfcpro/mfc-l/t5290.htm
I used it myself when I developed a UI with a tab control. If you have any further problems, just let me know, maybe I can help.
Good luck.
0
 
LVL 1

Expert Comment

by:Mensana
ID: 2757109
One more thing:
I used Terry Wellmann's solution!
0
 

Author Comment

by:thirumaran
ID: 2758011
Hi Mensana/anyone,
   One important point is that one of my dialog box is bigger than the size of the window,so implementation of scrollbar arises and 'am not able to make the scroll bar to move the page downwards.

Help me in this regard,

Thanx,
Thiru
0
 
LVL 1

Accepted Solution

by:
Mensana earned 25 total points
ID: 2759212
I don’t understand what are you trying to do. If you have so many controls on one tab that there is not enough real estate you can actually add a new tab and try to split the controls between two tabs. Eventually you can consider the possibility of having a tab control within a tab control. Basically, on a tab page for a tab control you can throw controls of any kind. I don’t understand what are you trying to scroll! A tab control is used on a dialog box oriented app. There is no way of scrolling such a window. You may want to look into resizing the controls or taking a different approach by using MDI apps. Try to be more specific so I can understand exactly the nature of your problem.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Detect CR LF to each line 12 153
fizzArray  challenge 1 63
no14 challenge 14 62
Excel file not created as expected 7 50
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now