Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

I need TPropertySheet Informations

Posted on 1997-09-08
3
Medium Priority
?
189 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 300 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
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.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

598 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