how to set property sheet's title in the bottom

Posted on 2000-03-15
Last Modified: 2013-11-20
I meet a problem, when I am using VC++6, I want to set my propertysheet's title in the bottom of propertysheet( like vc++ ide's classview, resource view, itc.)
I don't want to use CTabCtrl, then create Dialog as its child control.  
Question by:zhangguangcheng
  • 2

Accepted Solution

cdepetris earned 100 total points
ID: 2622425
Derive a class from CPropertySheet using class wizard, then add a handler for OnInitDialog and change the code to

BOOL YourPropSheet::OnInitDialog()
CWnd* pWnd = GetDlgItem(AFX_IDC_TAB_CONTROL);
if (pWnd)
pWnd->ModifyStyle(0, TCS_BOTTOM);
return CPropertySheet::OnInitDialog();

Then use YourPropSheet in place of CpropertySheet

LVL 10

Expert Comment

ID: 2624165
CTabCtrl* pTab = GetTabControl()

is probably better than the GetDlgItem(AFX_IDC_TAB_CONTROL) method (which is not officially documented)

Another way is to subclass the tab contorl, then you can take more control of it (eg. use owner-draw for colouring tabs.


Author Comment

ID: 2627044
yes, this is right, but I have already resolve the problem by myself.
First time I do it look like yours, but I found problem on painting. so I ask questions on the expert-exchange.
but I add the setactivepage(0), it can resolve it. and you haven't this one.
my ways to it:

BOOL CMyPropSheet::OnInitDialog()
CTabCtrl* tab= GetTabControl();                                                          
DWORD dwStyle=::GetWindowLong(tab->m_hWnd,GWL_STYLE);



Expert Comment

ID: 2628284
The painting problem can be resolved by calling the base class after SetWindowLong.


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
Need a Shell script to start a service checking the port 6 48
Need Help INsttalling wget on Mavericks OS X 3 90
format the code in java 6 86
sumHeights2  challenge 7 87
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

932 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

12 Experts available now in Live!

Get 1:1 Help Now