TPageSetupDialog v2.04

Description:
  A component to wrap the PageSetupDlg API function that Borland forgot.
  It is a common dialog available on the Win95 platform, so it can not be
  used with Delphi 1.0.

Contact Information:
  Feel free to contact me if you have any questions, comments or suggestions
  at bstowers@pobox.com.
  The lateset version will always be available on the web at:
    http://www.pobox.com/~bstowers/delphi/

Known Issues:
  * There appears to be a bug in the PageSetupDlg Win32 API function.  If the
    PSD_INHUNDREDTHSOFMILLIMETERS flag is used, default minimum margins aren't
    enforced by the dialog.  If PSD_INTHOUSANDTHSOFINCHES is used, they are
    enforced. The reason I think it is an API bug is that Notepad exhibits the
    exact same behavior.  Try this:  Run Notepad with the U.S. measurement
    system and the Metric system.  You'll notice under U.S. that when you go
    into the page setup dialog of Notepad, it will default to your printer's
    minimum margins if you enter a value of 0 for any of the margins.  Under
    metric, you'll notice that entering a value of 0 will be accepted.  You
    can change the measurement system you are currently using by going into
    the Regional Settings Control Panel and chaning the Measurement System
    on the Number tab.
    Note that this only affects the dialog when poDefaultMinMargins is set in
    the Options property.  If this flag is not set, the values in the
    MinimumMargins property will be used and enforced by the dialog.  So,
    a possible work-around for this problem might be to simply leave out the
    poDefaultMinMargins flag.  This would result in the default minimum
    margins being read by the component at start up, and then used by the
    dialog as hard-coded values that it will enforce.  I have not tried this,
    but it seems like it should work.


Revision History:
2.04   + Added PgSetupReg unit.  All IDE specific code (i.e. registering the
         component, property editors, etc.) are contained in this unit.  This
         was done for two primary reasons:  1) Using the component in a Delphi
         or C++Builder expert would register the component as well.  2) Reduce
         code size in some cases -- usually the smart linker removes this sort
         of stuff since the app never references it, but now it's for certain
         since it isn't even in the unit.  This change means that you need to
         install the component using the new "registration" unit instead of
         the unit containing the component.
2.03:  + Seriously nasty bugs that wouldn't update properties like PageSize
         after the user made a selection.  Fixed.
       + Updated demo project to work with either inches or millimeters.
       + Updated Known Issues above.
2.02:  + PageSize, Margins, MinimumMargins didn't seem to get the system
         default values if the Measurements property was pmDefault.  I've
         reworked the whole thing and it seems to work as it should now.
       + Changing Measurements property would not update custom values of the
         PageSize, Margins, and MinimumMargins properties.  They would only
         update if they contained the system defaults.  Fixed.
       + Forgot to include the updated demo in the distribution archive.  Old
         demo wouldn't compile...
2.01:  + Added Version property.
2.00:  + MinimumMargins weren't being enforced.  Default minimums were always
         being used.  That should only happen if poDefaultMinMargins is set in
         Options.  Fixed.
       + PageSize, Margins, and MinimumMargins are all now published instead of
         public.  They initially have the default values of the system, and if
         you do not change them, they will continue to get the default values
         of the system the application is run on.  That is, if your printer has
         a default margin setting of 1000, 1000, 1000, 1000, but one of your
         user's has a printer that has 750, 750, 750, 750, the component will
         show your settings at design time, but use the system's defaults that
         it is being run on.  However, if you change the values, they are then
         stored in your DFM file and used on everyone's system.  If you change
         the values and they are thus stored this way and you change your mind,
         you can get it to revert back to the system defaults by editing your
         form file (right click on it and select View As Text) and removing the
         entries for that property entirely.
       + PageSize, Margins, and MinimumMargins now contain the system defaults
         when initially created.  This is done by calling ReadCurrentValues in
         the constructor, therefor you will rarely need to call this method
         yourself.
       + The following enhancements were suggested by Indridi Bjornsson
         <indridi@isholf.is> and based on code sent by him.  Many thanks.
       + New DefaultMeasurements read-only property that indicates how the
         current system likes to measure things (inches or millimeters) and an
         associated CurrentMeasurements property that translates pmDefault into
         the system value so you get only a pmInches or pmMillimeters value.
       + Measurements property has a new default value, pmDefault.  If set to
         this, the value of DefaultMeasurments will be used in order to use the
         preferences set on the current system.
       + Added two new methods, FromMeasurementVal and ToMeasurementVal to
         convert a value such as Margins.Top to a double value and vice versa
         based on current measurement type.  For example, if the paper size is
         8 1/2 inches and pmInches is the current measurement system, PageSize.X
         would have a value of 8500.  FromMeasurementVal would convert that to
         8.5.
1.10:  + Added ReadCurrentValues method so the properties can be populated from
         the system and can be read without actually displaying the dialog.
1.04:  + New property: Centered.  I bet you can guess what it's for.
       + Fixed problem with C++Builder 3 run-time packages.
1.03:  + Updated for new DFS.INC file, component tab name, history/comments
         file.
1.02:  + Updated to for compatibility with Delphi 3.
1.01:  + Added "property editor" to allow testing the dialog at design-time.
         Just right click on it and select 'Test Dialog' from the menu.
1.00:  + Initial release.
