?
Solved

CPropertySheet Wizard - changing window style

Posted on 2005-03-14
6
Medium Priority
?
804 Views
Last Modified: 2013-11-20
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
Comment
Question by:antinutrino
[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
  • 4
  • 2
6 Comments
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 13534217
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
 

Author Comment

by:antinutrino
ID: 13534369
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
 

Author Comment

by:antinutrino
ID: 13534379
Sorry, should have said

I used

ModifyStyle(WS_SYSMENU, 0);

in OnInitDialog in the propertysheet.
0
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 
LVL 44

Accepted Solution

by:
AndyAinscow earned 500 total points
ID: 13534405
Post some code please  (cs.dwExStyle |= WS_EX_TOOLWINDOW should work)
0
 

Author Comment

by:antinutrino
ID: 13535921
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
 

Author Comment

by:antinutrino
ID: 13553977
Hi

I found the problem. I should have been using

ModifyStyleEx!


Thanks
0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

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: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

777 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