Link to home
Start Free TrialLog in
Avatar of thirumaran
thirumaran

asked on

Display in a tab control

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
Avatar of yarond
yarond

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.
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.
One more thing:
I used Terry Wellmann's solution!
Avatar of thirumaran

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of Mensana
Mensana

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial