Author |
Topic: Property Sheets (Read 1186 times) |
|
Matt
Developer
member is offline


Gender: 
Posts: 210
|
 |
Property Sheets
« Thread started on: Nov 12th, 2014, 7:44pm » |
|
Hi,
I don't tend to use property sheets, but the preferences for the program I'm writing is too large to be reasonably placed in a dialog box. As explained in the help, the property sheet is created by creating sub-dialog boxes. The property sheet then collects these together to form a succession of them which it displays as either a property sheet or a wizard. When it is finished with, the help states that it must be closed: PROC_closepropsheet(psh%), especially before closing the program. However, I can't work out whether the individual dialog boxes need to be closed as well, or if this happens as a result of closing the property sheet. Reading the help, the assumption is not, but I thought I'd make sure.
Matt
|
|
Logged
|
|
|
|
rtr2
Guest
|
 |
Re: Property Sheets
« Reply #1 on: Nov 12th, 2014, 9:33pm » |
|
on Nov 12th, 2014, 7:44pm, Matt wrote:I can't work out whether the individual dialog boxes need to be closed as well |
|
The clue is that you never open any of the individual dialogue boxes (i.e. you don't call PROC_showdialog) so since you never open them, there is nothing to close!
Consider this analogy. Suppose you have a program which incorporates a number of dialogue boxes which are opened under certain circumstances. For example you may have a 'Customize' dialogue box which is opened if the user selects a particular menu item. In such a program you always create the dialogue box template, during the initialisation phase of the program, but you may never open the dialogue box itself (or you may open it once, or you may open it many times).
Obviously in such a program you only close a dialogue box (PROC_closedialog) if you have previously opened it (PROC_showdialog). The fact that you created the dialogue box template during the initialisation phase of the program (FN_newdialog) does not of itself mean that there is anything to close.
Exactly the same is true of a Property Sheet or Wizard. You create the templates for the individual pages during the initialisation phase of the program and you open the Property Sheet or Wizard zero, one or more times whilst the program is running. For each time you open the sheet/wizard you later close it; if you never open it you never close it.
Richard.
|
|
Logged
|
|
|
|
Matt
Developer
member is offline


Gender: 
Posts: 210
|
 |
Re: Property Sheets
« Reply #2 on: Nov 13th, 2014, 06:22am » |
|
on Nov 12th, 2014, 9:33pm, g4bau wrote:The clue is that you never open any of the individual dialogue boxes (i.e. you don't call PROC_showdialog) so since you never open them, there is nothing to close! |
|
Not directly. But does the PROC_showpropsheet call not imply a kind of multiple PROC_showdialog in itself. I can understand the fact that, even if a dialog box is created, if it is not shown it need not be closed. But the property sheet is shown and therefore needs to be closed - which it is, using the call PROC_closepropsheet. But the individual dialog boxes are also shown. Or is there a fundamental error in my understanding of the way property sheets are displayed? Is it that the information only is used in the creation/display of the property sheet and therefore, technically, the dialog box is not displayed?
Another question: You can centre a dialog box on the screen by inserting an additional line dlg%!16 = &90C808C4 after the FN_newdialog line. But I can't work out how to centre a property sheet. Is there a way?
Matt
|
|
Logged
|
|
|
|
rtr2
Guest
|
 |
Re: Property Sheets
« Reply #3 on: Nov 13th, 2014, 1:16pm » |
|
on Nov 13th, 2014, 06:22am, Matt wrote:Or is there a fundamental error in my understanding of the way property sheets are displayed? |
|
Whether or not "the individual dialog boxes are also shown" is an implementation detail hidden within Windows; Microsoft does not reveal if that's how it works internally, and nor do they need to. What is important is that they are not shown by BBC BASIC so they do not need to be closed by BBC BASIC.
Quote:Is it that the information only is used in the creation/display of the property sheet and therefore, technically, the dialog box is not displayed? |
|
Again, that degree of implementation detail is not revealed by Microsoft; maybe the individual Property Sheet or Wizard pages are displayed as if they were dialogue boxes, or maybe they are not. Either way it's not your problem!
Quote:Another question: You can centre a dialog box on the screen by inserting an additional line dlg%!16 = &90C808C4 after the FN_newdialog line |
|
Rather more clearly coded as:
Code: Quote:But I can't work out how to centre a property sheet. Is there a way? |
|
A Google search suggests that there's no very straightforward way. My suggestion would be to create the Property Sheet initially 'hidden' (so it doesn't matter where it is positioned), then move it to the centre of the screen, and then show it. I've not tried it, but it sounds plausible!
Richard.
|
|
Logged
|
|
|
|
Matt
Developer
member is offline


Gender: 
Posts: 210
|
 |
Re: Property Sheets
« Reply #4 on: Nov 15th, 2014, 07:13am » |
|
Any idea why dlg%!16 OR= DS_FIXEDSYS doesn't work?
The only way I can get a dialog box to show the FIXEDSYS font is by using dlg%!16 -= &8, but this is obviously not right as some items don't display.
Matt
|
|
Logged
|
|
|
|
|