Solved

I need TPropertySheet Informations

Posted on 1997-09-08
3
187 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
[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
3 Comments
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 150 total points
ID: 1299378
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
ID: 1299379
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
ID: 1299380
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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

691 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