Solved

I need TPropertySheet Informations

Posted on 1997-09-08
3
183 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to make similar contact form? 8 65
PHP parse error 7 56
video playback resume on webpages 2 66
Windows Tool to Build Android and iOS App 3 53
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
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…

911 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

23 Experts available now in Live!

Get 1:1 Help Now