I need TPropertySheet Informations

Hi!

Could anybody give me some informations about TPropertySheet with the 4th parameters (isWizard) set on true
// MyPropertySheet( parent, "title", 0, true )

I don't understand the following problems:
- When I set this parameter on true, my pages are not centered in the Sheet, Why ?.
( the right margin is larger than the left margin )

- I don't know how to hide the 'back' button on the first page on my sheet

- How to valid the changes in my pages when I selected the last page ?

(I use BC++ 5.0)

Thanks for your help
dreynierAsked:
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.

Tommy HuiEngineerCommented:
The isWizard flag is used to determine whether or not this property sheet is designed to be a wizard. A wizard is a series of property pages (dialogs) that are steps of an action. For example, you might want a wizard for an installation program.

Windows regards the wizard flag as saying that my property pages are supposed to be the same size. Hence, your property pages are no longer centered.

When your first page is put in the foreground, you can use
  TMyPropertySheet->SendMessage(PSM_SETWIZBUTTONS, 0, PSWIZB_NEXT);

Note that you can use PSWIZB_NEXT, PSWIZB_FINISH, and PSWIZB_BACK as additional flags for the lParam in SendMessage().

I would use OnOk on the last page to check all the other settings are valid.
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
msmitsCommented:
Actually the dialog pages of a wizard are supposed to be a specific width and height. A description of this can be found when you look for 'wizard' in the index of the Windows Help. There are some macros defined for this.
What happens is that the dialog pages are put in the wizard window at a specific location and anything to the right of that is left empty.

When you are using TPropertyPage derived objects for each page, you can put the following code in the SetActive virtual function of your first page:

  ::PostMessage(Parent->HWindow, PSM_SETWIZBUTTONS,
      0, PSWIZB_NEXT)

As thui has explained you can also use the other macros for the other buttons with the | operation). The above given helpfile also describes to use the PostMessage call in the SetActive notification.
You have to take care to enable the Back button in your second page with another PostMessage().

I believe it is customary to verify the information when the user clicks the Next button. That is the easiest way of getting to the controls in your page. You can then also copy then to some more global structure so you have everything together when you are at the end of your wizard.

0
dreynierAuthor Commented:
Thanks for your answer

Help about 'wizard' mentions the sizes of the elements in the wizard PropertySheet but not how to modify this size !

All my pages have the same Heighth and Width
 ( 255 wide * 190 high )
When I switch the parameter 'isWizard' to False (standard propertySheet) everything is Ok, but when I switch that parameter to True, the PropertySheet is wider and my pages are not horizontally centered

Can the size of the PropertySheet be modified and if so how to do it?
 
Could you help me about that?
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
Web Languages and Standards

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.