Unit PGDsgFrm

================================================================================ DesignerForms - Used to enhance the look and functionality of form caption bars. ================================================================================ Purpose: Allows users to redefine how elements of the caption bar are drawn. Classes: Name Purpose TPGCaptionBar Main caption bar component TPGCaptionBarButton Creates a Button in the caption bar. TPGCaptionBarGlyph Creates a Glyph in the caption bar. TPGCaptionBarSystemButton Creates a System button in the caption bar. TPGCaptionBarRollUpButton Creates a Roll up button in the caption bar. TPGCaptionBarOnTopButton Creates an OnTop button in the caption bar. Associated Files: PGCapReg Registration unit PGCapFm1 Property editors for DesignerForms. PGGlyph Glyph Engine PGSubCls Windows Subclassing Interface History: Version Date(d/m/y) Programmer Comments 1.0 14/12/96 Brad Parks Creation. Credits: DesignerForms was a very large undertaking, and could not have been completed without the generous contributions of source code that the following people made available to the public. Creating Forms With Custom Title Bars (Little Title) http://www.mindspring.com/~cityzoo/ttlbar1.html Mark R. Johnson keeper@mindspring.com Lloyd Linklater - Lloyd's Help File (June 1996) Topic found by searching for: icon to bitmap procedure PGScaleAnIcon(Form: TForm; hBmp: HBitmap; hIcon: HIcon); Unknown source - Ensures that forms maximize correctly under Win95 Shell. procedure TPGCaptionBar.WMGetMinMaxInfo(var Message: TWMGetMinMaxInfo); ================================================================================ Copyright © 1996, The Programmers' Guild. All Rights Reserved ================================================================================

Classes

TPGCaptionBar -
TPGCaptionBarButton -
TPGCaptionBarButtonBase -
TPGCaptionBarComponent -
TPGCaptionBarGlyph -
TPGCaptionBarGlyphBase -
TPGCaptionBarOnTopButton -
TPGCaptionBarRollupButton -
TPGCaptionBarSystemButton -

Functions

PGScaleAnIcon - Scales an icon down to a 16x16 bitmap using the DC of a form as } { the compatible device context.

Types

TPGCaptionBarComponentButtonType
TPGCaptionBarOption
TPGCaptionBarOptions
TPGCaptionBarPaintOperation
TPGCaptionBarState
TPGCaptionBarStates
TPGSystemButtonKind
TPGSystemButtonKinds
TPGSystemButtonStyle

Constants

cb_BottomHitTestingMargin
cb_DefaultHorzGap
cb_DoubleClickTime
cb_MinCapBarWidth
cb_NormalHeight
dta_ConfirmDeleteOfCaptionBar
dta_ConfirmSetLargeHeight
dta_ConfirmSetLargerWidth
dta_CreateCaptionBarAtDesignTime
dta_NotifyAutosizingButtons
dta_NotifyTransparentColorProblem
dta_SelectComponentAtDesignTime

Variables

PGDesignTimeActionOk


Functions


procedure PGScaleAnIcon(Form: TForm; hBmp: HBitmap; hIcon: HIcon);

Scales an icon down to a 16x16 bitmap using the DC of a form as } { the compatible device context.

Types


TPGCaptionBarComponentButtonType = (cctPushButton, cctToggleButton, cctStaticButton);

TPGCaptionBarOption = (cboButtonsSameHeight, cboButtonsSameWidth,
                         cboButtonsAutosize, cboCaptionBarAutosize,
                         cboDesignTimeActive, cboDesignTimeEnhancements,
                         cboDesignTimeTips);

TPGCaptionBarOptions = set of TPGCaptionBarOption

TPGCaptionBarPaintOperation = (cbpPaintAll, cbpComponentsThatNeedPainting);

TPGCaptionBarState  = set of TPGCaptionBarStates

TPGCaptionBarStates = (cbsSizing,cbsIgnoreResizingEvents,cbsDestroying,
                         cbsDoubleClicked,cbsCreatingComponents);

TPGSystemButtonKind  = (sbkSystemClose, sbkMaximize, sbkMinimize, sbkSystemMenu);

TPGSystemButtonKinds = set of TPGSystemButtonKind

TPGSystemButtonStyle = (sbsOwnerGlyph, sbsAutoDetect, sbsWin31, sbsNew);

Constants

cb_BottomHitTestingMargin = 13

cb_DefaultHorzGap = 2

cb_DoubleClickTime = 100

cb_MinCapBarWidth = 60

Caption Bar constants

cb_NormalHeight = 18

dta_ConfirmDeleteOfCaptionBar = 12

dta_ConfirmSetLargeHeight = 13

dta_ConfirmSetLargerWidth = 14

dta_CreateCaptionBarAtDesignTime = 11

dta_NotifyAutosizingButtons = 16

dta_NotifyTransparentColorProblem = 15

dta_SelectComponentAtDesignTime = 10

Design Time Action constants

Variables

PGDesignTimeActionOk : Boolean

Used to return results from questions asked via the Design Time interface.