[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

how to set property sheet's title in the bottom

Posted on 2000-03-15
4
Medium Priority
?
303 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

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…
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.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

649 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