Solved

I need TPropertySheet Informations

Posted on 1997-09-08
3
180 Views
Last Modified: 2013-12-26
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
0
Comment
Question by:dreynier
3 Comments
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 150 total points
Comment Utility
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
 
LVL 3

Expert Comment

by:msmits
Comment Utility
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
 

Author Comment

by:dreynier
Comment Utility
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

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

762 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now