Solved

how to set property sheet's title in the bottom

Posted on 2000-03-15
4
282 Views
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.  
0
Comment
Question by:zhangguangcheng
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
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);
ASSERT(pWnd);
if (pWnd)
pWnd->ModifyStyle(0, TCS_BOTTOM);
return CPropertySheet::OnInitDialog();
}

Then use YourPropSheet in place of CpropertySheet

HTH,
Chris
0
 
LVL 10

Expert Comment

by:RONSLOW
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.


0
 

Author Comment

by:zhangguangcheng
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()
{
CPropertySheet::OnInitDialog();
      
CTabCtrl* tab= GetTabControl();                                                          
DWORD dwStyle=::GetWindowLong(tab->m_hWnd,GWL_STYLE);
SetWindowLong(tab->m_hWnd,GWL_STYLE,dwStyle|TCS_BOTTOM);
SetActivePage(0);

}


0
 
LVL 1

Expert Comment

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

Chris
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

726 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