Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 827
  • Last Modified:

CPropertySheet Wizard - changing window style

Hi

I am using a CPropertySheet with wizard mode on. I want to alter
the window title to be similar to that of a  Tool Window. ie. smaller
title text and I want to disable/hide the close button (the one displayed
in the title bar).

Can any help, the changes I have tried are not having any effect.

Thanks
anti
0
antinutrino
Asked:
antinutrino
  • 4
  • 2
1 Solution
 
AndyAinscowCommented:
In your CPropertySheet class override the PreCreateWindow and give the following a try
cs.dwExStyle |= WS_EX_TOOLWINDOW;  //smaller title bar - tool window

you could try removing the WS_SYSMENU from the style of the window (that hides the close button BUT it also prevents the system menu)
0
 
antinutrinoAuthor Commented:
Hi

I tried that but with no effect.

I used

ModifyStyle(WS_SYSMENU, 0);

to remove the close button. But I cannot seem to change the Window title style.

Thanks
anti
0
 
antinutrinoAuthor Commented:
Sorry, should have said

I used

ModifyStyle(WS_SYSMENU, 0);

in OnInitDialog in the propertysheet.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
AndyAinscowCommented:
Post some code please  (cs.dwExStyle |= WS_EX_TOOLWINDOW should work)
0
 
antinutrinoAuthor Commented:
Hi

BOOL CBackupWzdDlg::PreCreateWindow(CREATESTRUCT& cs)
{
      // TODO: Add your specialized code here and/or call the base class
      cs.style |= ~WS_SYSMENU;
      cs.dwExStyle |= WS_EX_TOOLWINDOW;

      return CBackupWzdDlg_Base::PreCreateWindow(cs);
}

OnInitDialog
ModifyStyle(WS_SYSMENU, 0);                                      // this works
ModifyStyle(0, WS_EX_TOOLWINDOW);


I am using CPropertySheetEx

Thanks


0
 
antinutrinoAuthor Commented:
Hi

I found the problem. I should have been using

ModifyStyleEx!


Thanks
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now