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
antinutrinoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AndyAinscowFreelance programmer / ConsultantCommented:
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
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

AndyAinscowFreelance programmer / ConsultantCommented:
Post some code please  (cs.dwExStyle |= WS_EX_TOOLWINDOW should work)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.