home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-09-06 | 164.1 KB | 4,799 lines |
- Microworks ObjectMate 2.6
- Windows Interface Development Kit.
- Copyright ⌐ 1992-1994 Microworks
- Sydney, Australia.
- CompuServe 100026,1134
- Release date: 6-9-94.
-
- Welcome to ObjectMate 2.6
- --------------------------
-
- This text file contains a detailed description of each object
- in the ObjectMate Interface Library including the custom
- controls, dialogs, common dialogs, windows, exported functions
- and private messages. At some stage you should read this
- entire file.
-
-
-
- -----------------
- TABLE OF CONTENTS
- -----------------
-
- 1 Buttons.
- 2 Splash Bitmaps
- 3 Static controls.
- 4 Shade controls.
- 5 Dividers.
- 6 Check boxes.
- 7 Radio buttons.
- 8 Scroll bars.
- 9 Edit controls.
- 10 List boxes.
- 11 Combo boxes.
- 12 Toolbars.
- 13 Percent gauges.
- 14 MDI Clients.
- 15. Dialog Boxes.
- 16. Common Dialog Boxes.
- 17. Windows.
- 18. 3D Menus.
- 19. Message Boxes and Input Boxes.
- 20. Functions.
- 21. Private Messages
-
-
-
- -------------
- 1. BUTTONS.
- -------------
-
- GLOBAL CLASS NAME: SFXBUTTON
-
- FUNCTION:
-
- - Borland-style bitmap buttons, Resizeable bitmap buttons,
- Icon buttons, Text buttons and Splash Panels.
-
-
- NEW FEATURES:
-
- - Changed the Single-Bitmap button style to the Bitmap-Button
- style and enhanced it so that it can display one, two or three
- bitmaps.
-
- - Flicker free painting of the Text and Bitmap button styles.
-
- - The Bitmap-Button style (MBS_BITMAPBUTTON) now displays
- resizeable Borland-style buttons.
-
- - Added an Icon Button style that displays an icon on a button
- at run time.
-
-
- FLAGS:
-
- - The SFXButton class has no BS_DEFPUSHBUTTON style. The MBS_XXX
- button flags are used by SFX buttons, check boxes and radio
- buttons. The MBS_FLUSH flag and the MBS_RAISED flag are the
- same. MBS_FLUSH specifies a flush button and MBS_RAISED
- specifies a raised check box or radio button. The MBS_LEFTTEXT
- flag is used by SFX check boxes and radio buttons to display
- left aligned text. The MBS_XXX color flags are used by SFX
- buttons to set the button text color and by SFX check boxes and
- radio buttons to set the check mark color (eg MBS_RED). The
- MBS_BITMAP flag specifies a non pushable splash bitmap and the
- MBS_DEFFONT flag draws the button text using a fine font. The
- button flags are:
-
- MBS_PUSHBUTTON same as BS_PUSHBUTTON
- MBS_CHECKBOX same as BS_CHECKBOX
- MBS_AUTOCHECKBOX same as BS_AUTOCHECKBOX
- MBS_RADIOBUTTON same as BS_RADIOBUTTON
- MBS_3STATE same as BS_3STATE
- MBS_AUTO3STATE same as BS_AUTO3STATE
- MBS_AUTORADIOBUTTON same as BS_AUTORADIOBUTTON
- MBS_ICONBUTTON displays an icon on a button at run time
- MBS_DEFFONT draws the button, check box and radio
- button text using a fine font.
- MBS_LEFTTEXT aligns check box and radio button text
- flush left.
- MBS_RAISEDTEXT draws button, check box and radio
- button text so that it appears raised.
- MBS_RECESSEDTEXT draws button, check box and radio
- button text so that it appears recessed.
- MBS_RED The MBS_RED to MBS_YELLOW flags draw
- MBS_LIME button text and check box and
- MBS_BLUE radio button check marks in the corresponding
- MBS_MAGENTA color.
- MBS_MAROON
- MBS_GREEN
- MBS_NAVY
- MBS_PURPLE
- MBS_YELLOW
- MBS_FLUSH draws a flush border around a push button
- MBS_RAISED draws a raised check box or radio button
- MBS_BITMAP splash bitmap
- MBS_BITMAPBUTTON resizeable bitmap button
- MBS_TEXTBUTTON resizeable text button
-
-
- RESOURCE IDENTIFIERS:
-
- - Bitmap ID's for the bitmap buttons should follow the Borland
- numbering system:
-
- 1000 + button ID (up bitmap)
- 3000 + button ID (down bitmap)
- 5000 + button ID (focussed bitmap)
-
- CGA and EGA bitmaps are not supported.
-
-
- BUTTON ID'S:
-
- - Button ID's should be between 100 and 999. Numbers 0 to 99 are
- reserved for use by SFX200.DLL. The help button ID is 8 not
- 998. The previous conflict that occurred with Borland's help
- button ID in RC files has been fixed in the new version of
- SFX200.H. ID's 1 to 11 display one of the standard bitmap
- buttons in SFX200.DLL.
-
-
- BUTTON STYLES:
-
- - Default button
- - Bitmap button
- - Icon Button
- - Text button
- - Splash bitmap
-
-
- DEFAULT BUTTON STYLE:
-
- - The default button style is a Borland-style bitmap button.
- There is no flag for this style. Its standard size is 74 by 48
- pixels and it requires 3 bitmaps to display correctly (up, down
- and focussed). Each bitmap should include the button borders.
- If no bitmaps are specified for a given button ID, that button
- uses the default blank bitmaps and displays text. This button
- style is not resizeable.
-
-
- BITMAP BUTTON STYLE:
-
- - This button style is specified using the MBS_BITMAPBUTTON flag.
- It can be used to create buttons that display one, two or three
- bitmaps. Each bitmap should be drawn flat as this button
- paints its own borders. If only one bitmap is specified in
- the resource file, that bitmap is used in all three button views
- (up, down and focussed) and is offset in the down view. If
- a down bitmap is specified the down bitmap is not offset so any
- movement of the bitmap has to be drawn by you. If no focussed
- bitmap is specified the up bitmap is used in the focussed view.
- This button style is resizeable. Specifying one of the standard
- button ID's (1 to 11) with this style creates a resizeable
- Borland-style bitmap button (see Object Viewer). The minimum
- size of a resizeable standard bitmap button (ie id's 1 to 11) is
- 74 by 48 pixels.
-
-
- ICON BUTTON STYLE:
-
- - This style displays an icon on a button at run time. You must
- load and delete the icon yourself, SFX200.DLL just displays it.
- To specify an icon button set the MBS_ICONBUTTON flag or check
- the Icon Button check box in the button style dialog in RW. An
- icon button in RW appears blank because an icon can only be
- displayed at run time. To display an icon send the icon
- button a WM_SETBITMAP message: wParam is the icon handle and
- lParam is zero. A 'SetIcon' member function has been added to
- TSFXButton that sends this message for you. All you have to do
- is add the following code to somewhere like your SetupWindow
- method:
-
- eg. C++
-
- But1->SetIcon(newIcon); // newIcon must be a valid icon handle.
-
- eg. Pascal
-
- But1^.SetIcon(newIcon); // newIcon must be a valid icon handle.
-
- - When you want to update an icon don't forget: your responsible
- for deleting the current icon. Do not combine MBS_ICONBUTTON
- with MBS_BITMAPBUTTON, MBS_TEXTBUTTON, MBS_BITMAP or any of the
- standard BS_XXX button flags. These flags are mutually exclusive.
-
-
- RESIZEABLE TEXT BUTTONS:
-
- - Resizeable text buttons are created by specifying the MBS_TEXTBUTTON
- flag. This style can display normal, recessed, raised or
- colored button text.
-
-
- SPLASH BITMAPS:
-
- - A non-pushable splash bitmap is displayed by ID when you
- specify the MBS_BITMAP flag. Splash bitmaps can also be
- displayed by name using an SFXStatic control.
-
- BITMAP BUTTON MNEMONICS:
-
- - A mnemonic is the underlined text character that activates
- a button when the corresponding key is pressed on the
- keyboard. To ensure that a mnemonic character works for a bitmap
- button, set the button's text, including underlined character to
- correspond to the text displayed on the bitmap. This is done
- automatically for the 11 standard bitmap buttons.
-
-
- PRIVATE MESSAGES:
-
- - You can use the any of the following messages (defined in
- SFX200.PAS and SFX200.H) with an SFXButton control:
-
- - WM_SETBITMAP
- - WM_SETBRUSH
- - WM_SFXCTLCOLOR
-
-
- WM_SETBITMAP:
-
- - If the button is not an Icon button this message is used to
- change the button ID. wParam is the new ID and lParam is zero.
- If the button is a bitmap button (or splash bitmap) with
- predefined bitmaps in the resource file, the bitmaps are also
- changed.
-
- - If the button is an Icon button this message is used to change
- the icon a button displays. wParam is a valid icon handle and
- lParam is zero. SFX200.DLL does not delete icon handles, that's
- your responsibility.
-
-
- WM_SETBRUSH:
-
- - Sets the brush that's used to paint a text button's face.
- The default brush is light gray. This should be sent in
- response to a WM_SFXCTLCOLOR message. wParam is a handle to the
- new brush and lParam is zero. SFX200.DLL does not delete the brush
- handle. That's your responsibility.
-
-
- WM_SFXCTLCOLOR:
-
- - This message is sent to its parent when an SFX control is about
- to be painted. It is analogous to the WM_CTLCOLOR message.
- wParam contains the button's display context, the LOWORD of
- lParam contains the button's handle and the HIWORD of lParam
- specifies a button control (SFXCTLCOLOR_BUTTON).
-
- Pascal Example:
-
- procedure TMyWindow.WMSFXCtlColor (var Msg: TMessage);
- begin
- case Msg.lParamHi of
- SFXCtlColor_Button:
- begin
- SetBkMode(Msg.wParam, Transparent);
- SendMessage(Msg.lParamLo, wm_SetBrush,
- GetSFXObject(Red_Brush), 0);
- end;
- end;
- end;
-
- C++ 4.0 Example:
-
- LRESULT
- TMyWindow::EvSFXCtlColor(WPARAM wParam, LPARAM lParam)
- {
- if (HIWORD(lParam) == SFXCTLCOLOR_BUTTON)
- {
- ::SetBkMode((HDC)wParam, TRANSPARENT);
- ::SendMessage((HWND)LOWORD(lParam), WM_SETBRUSH,
- (UINT)GetSFXObject(RED_BRUSH), 0);
- }
- }
-
-
- OBJECTWINDOWS CLASS: TSFXButton.
-
- ANCESTOR CLASS: TButton.
-
- CONSTRUCTORS:
-
- Pascal:
-
- Init (AParent: PWindowsObject; AnID: Integer; AText: PChar;
- X, Y, W, H: Integer);
-
- InitResource (AParent: PWindowsObject; ResourceID: Word);
-
-
- C++ 4.0:
-
- TSFXButton(TWindow* parent, int id, const char far* text,
- int x, int y, int w = 0, int h = 0, TModule* module = 0);
-
- TSFXButton(TWindow* parent, int resourceId, TModule* module = 0);
-
- - When a Borland-style bitmap button is created it's automatically
- resized to 74 by 48 pixels, so the width and height arguments can
- be set to zero.
-
-
- PASCAL METHODS:
-
- function GetClassName: PChar; virtual;
- - returns the SFX button class name 'SFXBUTTON'.
-
- procedure SetButton (NewID: Integer);
- - changes a buttons ID and associated bitmaps, if any. NewID
- is the new button identifier.
-
- procedure SetIcon (NewIcon: HIcon);
- - changes the icon displayed on an icon button to
- NewIcon.
-
- procedure SetText (ATextString: PChar);
- - sets the text displayed on a text button to
- ATextString.
-
-
- C++ 4.0 MEMBER FUNCTIONS:
-
- char far* GetClassName();
- - returns the SFX button class name "SFXBUTTON".
-
- void SetButton(int newId);
- - changes a buttons Id and associated bitmaps, if any.
- newId is the new button identifier.
-
- void SetIcon(HICON newIcon);
- - changes the icon displayed on an icon button to
- newIcon.
-
- void SetText(const char far* str);
- - sets the text displayed on a text button to str.
-
-
-
- ---------------------
- 2. SPLASH BITMAPS.
- ---------------------
-
- GLOBAL CLASS NAME: SFXButton
-
- FUNCTION: Splash Bitmaps
-
- FLAGS: Uses the MBS_BITMAP button flag to specify a splash bitmap
-
- OBJECTWINDOWS CLASS: TSFXBitmap.
-
- ANCESTOR CLASS: TControl
-
- CONSTRUCTORS:
-
- Pascal:
-
- Init (AParent: PWindowsObject; AnID: Integer; X, Y: Integer);
-
- InitResource (AParent: PWindowsObject; ResourceID: Word);
-
- C++ 4.0:
-
- TSFXBitmap(TWindow* parent, int id, int x, int y, TModule* module = 0);
-
- TSFXBitmap(TWindow* parent, int resourceId, TModule* module = 0);
-
-
- PASCAL METHODS:
-
- function GetClassName: PChar; virtual;
- - returns the SFX button class name 'SFXBUTTON'.
-
-
- C++ 4.0 MEMBER FUNCTIONS:
-
- char far* GetClassName();
- - returns the SFX button class name "SFXBUTTON".
-
-
-
- ---------------------
- 3. Static controls.
- ---------------------
-
- GLOBAL CLASS NAME: SFXStatic
-
- FUNCTION: Static text, Splash Bitmaps
-
- NEW FEATURES:
-
- - Added a new flag (MSS_SFXPAINT) to provide smooth flicker-free
- painting for moving text. An example of this is used in the
- Object Viewer toolbar/status bar.
-
-
- FLAGS:
-
- - The default flags for an SFX static control are MSS_TEXT, MSS_TOP and
- MSS_LEFT. They specify normal, top-left aligned text.
-
- MSS_TEXT default.
- MSS_TOP default.
- MSS_LEFT default.
- MSS_RECESSEDTEXT recessed text.
- MSS_RAISEDTEXT raised text.
- MSS_SHADOWTEXT shadowed text.
- MSS_BITMAP splash bitmap.
- MSS_BITMAPWINDOW splash bitmap in a window (eg Object
- viewer splash panel.
- MSS_HCENTER centers text/bitmap horizontally.
- MSS_RIGHT aligns text/bitmap flush right.
- MSS_BOTTOM aligns text/bitmap flush bottom.
- MSS_VCENTER centers text/bitmap vertically.
- MSS_RECESSED draws recessed border.
- MSS_RAISED draws raised border.
- MSS_FRAME draws a recessed or raised frame when
- combined with the MSS_RECESSED or
- MSS_RAISED styles.
- MSS_WORDWRAP wraps text extending beyond the right border.
- MSS_SINGLELINE specifies a single line of text.
- MSS_NOPREFIX no prefix characters (same value as MSS_SFXPAINT)
- MSS_SFXPAINT forces control to use an alternative flicker free
- paint function. Intended for moving text.
- MSS_EXPANDTABS expands tab characters.
- MSS_DEFFONT displays text using a fine font
- MSS_CENTER MSS_VCENTER + MSS_HCENTER
- MSS_CENTERBITMAP MSS_BITMAPWINDOW + MSS_CENTER
- MSS_RAISEDFRAME MSS_RAISED + MSS_FRAME
- MSS_RECESSEDFRAME MSS_RECESSED + MSS_FRAME
-
- - Adding flicker free painting for moving text required an extra
- flag, but there wasn't one, so the MSS_SFXPAINT flag was
- doubled with the MSS_NOPREFIX flag. Specifying either flag
- causes the static control to use the alternate flicker-free
- paint method. While no performance penalty is incurred for a
- few static controls, a dialog box filled with static controls
- with either of these flags set tends to slow down repainting.
- The MSS_SFXPAINT flag should only be used for moving text as
- flicker is not a problem with static text.
-
-
- STATIC STYLES:
-
- - Normal Text (default)
- - Recessed Text
- - Raised Text
- - Shadowed Text (looks best in color because the shadow is dark gray)
- - Splash Bitmap
- - Splash Bitmap in a window (this style was used for the Object
- Viewer splash panel)
-
- PRIVATE MESSAGES:
-
- - You can use the any of the following messages (defined in
- SFX200.PAS and SFX200.H) with an SFX static control:
-
- - WM_SETBITMAP
- - WM_SETBRUSH
- - WM_SFXCTLCOLOR
-
-
- WM_SETBITMAP:
-
- - This message is used to change a splash bitmap. wParam is zero
- and lParam points to a null terminated string that is the
- name of the new bitmap (ie character resource identifier)
-
-
- WM_SETBRUSH:
-
- - There weren't enough flags left to include any for background
- color. So, to change a static control's background color you
- must send a WM_SETBRUSH message in response to a WM_SFXCTLCOLOR
- message. wParam is a handle to the background brush and lParam
- is zero. SFX200.DLL does not delete this brush handle. That's
- your responsibility.
-
-
- WM_SFXCTLCOLOR:
-
- - This message is sent to its parent when an SFX control is about
- to be painted. It is analogous to the WM_CTLCOLOR message.
- wParam contains the static control's display context, the
- LOWORD of lParam contains the static control's handle and the
- HIWORD of lParam specifies a static control (SFXCTLCOLOR_STATIC).
-
- Pascal Example:
-
- procedure TMyWindow.WMSFXCtlColor (var Msg: TMessage);
- begin
- case Msg.lParamHi of
- SFXCtlColor_Static:
- begin
- SetBkMode(Msg.wParam, Transparent);
- SendMessage(Msg.lParamLo, wm_SetBrush,
- GetSFXObject(Green_Brush), 0);
- end;
- end;
- end;
-
- C++ 4.0 Example:
-
- LRESULT
- TMyWindow::EvSFXCtlColor(WPARAM wParam, LPARAM lParam)
- {
- if (HIWORD(lParam) == SFXCTLCOLOR_STATIC)
- {
- ::SetBkMode((HDC)wParam, TRANSPARENT);
- ::SendMessage((HWND)LOWORD(lParam), WM_SETBRUSH,
- (UINT)GetSFXObject(GREEN_BRUSH), 0);
- }
- }
-
-
- OBJECTWINDOWS CLASS: TSFXStatic.
-
- ANCESTOR CLASS: TStatic.
-
- CONSTRUCTORS:
-
- Pascal:
-
- Init(AParent: PWindowsObject; AnID: Integer; ATitle:
- PChar; X, Y, W, H: Integer; ATextLen: Word);
-
- InitResource(AParent: PWindowsObject; ResourceID,
- ATextLen: Word);
-
- C++ 4.0:
-
- TSFXStatic(TWindow* parent, int id, const char far* title,
- int x, int y, int w, int h, UINT textLen,
- TModule* module = 0);
-
- TSFXStatic(TWindow* parent, int resourceId, UINT textLen,
- TModule* module = 0);
-
- PASCAL METHODS:
-
- function GetClassName: PChar; virtual;
- - returns the SFX static class name 'SFXSTATIC'.
-
-
- C++ 4.0 MEMBER FUNCTIONS:
-
- char far* GetClassName();
- - returns the SFX static class name "SFXSTATIC".
-
-
-
- -------------------
- 4. SHADE CONTROLS.
- -------------------
-
- GLOBAL CLASS NAME: SFXShade
-
- FUNCTION: Group Shades, Colored Panels and Dividers
-
- NEW FEATURES:
-
- - Changed the MSH_NOCAPTION flag to the MSH_DEFFONT flag so
- that shade controls can display text in a fine font like
- the other SFX controls: buttons, check boxes, radio buttons
- and static controls.
-
-
- FLAGS:
-
- - The default flags for an SFX shade control are MSH_LEFT, MSH_LTGRAY and
- MSH_RECT. They specify a flat light gray colored rectangle.
-
- MSH_LEFT default.
- MSH_LTGRAY default.
- MSH_RECT default.
- MSH_FRAME specifies a frame.
- MSH_VLINE specifies a vertical line.
- MSH_HLINE specifies a horizontal line.
- MSH_RECESSED draws a recessed rectangle or frame
- MSH_RAISED draws a raised rectangle or frame
- MSH_BORSTYLE draws the control in the Borland
- 3-dimensional style
- MSH_CENTER centers the caption
- MSH_RIGHT aligns caption flush right
- MSH_RECESSEDTEXT draws the caption using recessed text
- MSH_RAISEDTEXT draws the caption using raised text
- MSH_DEFFONT displays text using a fine font
- MSH_NOPREFIX no prefix characters in caption
- MSH_STEEL The following flags specify the
- MSH_GLAZE background color.
- MSH_RED
- MSH_LIME
- MSH_BLUE
- MSH_MAGENTA
- MSH_MAROON
- MSH_GREEN
- MSH_NAVY
- MSH_PURPLE
- MSH_BLACK
- MSH_WINCOLOR The background color is the color specified
- by COLOR_WINDOW.
- MSH_TRANSPARENT The background is transparent
- MSH_VHUMP MSH_VLINE + MSH_RAISED
- MSH_VDIP MSH_VLINE + MSH_RECESSED
- MSH_HHUMP MSH_HLINE + MSH_RAISED
- MSH_HDIP MSH_HLINE + MSH_RECESSED
- MSH_RAISEDFRAME MSH_RAISED + MSH_FRAME
- MSH_RECESSEDFRAME MSH_RECESSED + MSH_FRAME
-
- - Do not set the BS_GROUPBOX flag, TSFXShade doesn't use it.
-
-
- SHADE STYLES:
-
- - Rectangle
- - Frame
- - Vertical Line
- - Horizontal Line
-
- The above styles has no effect unless the MSH_RAISED or
- MSH_RECESSED flag is also specified.
-
-
- PRIVATE MESSAGES:
-
- - You can use the any of the following messages (defined in
- SFX200.PAS and SFX200.H) with an SFXShade control:
-
- - WM_SETBRUSH
- - WM_SFXCTLCOLOR
-
-
- WM_SETBRUSH:
-
- - This message is sent in response to a WM_SFXCTLCOLOR message to
- change the shade control's background color. wParam is a handle
- to a new brush and lParam is zero. SFX200.DLL does not delete
- this brush handle. That's your responsibility!
-
-
- WM_SFXCTLCOLOR:
-
- - This message is sent to a parent when an SFX control is about
- to be painted. It is analogous to the WM_CTLCOLOR message.
- wParam contains the shade control's display context, the
- LOWORD of lParam contains the shade control's handle and the
- HIWORD of lParam specifies a shade control (SFXCTLCOLOR_SHADE).
-
-
- OBJECTWINDOWS CLASS: TSFXShade.
-
- ANCESTOR CLASS: TGroupBox.
-
- CONSTRUCTORS:
-
- Pascal:
-
- Init(AParent: PWindowsObject; AnID: Integer; AText: PChar;
- X, Y, W, H: Integer);
-
- InitResource (AParent: PWindowsObject; ResourceID: Word);
-
- C++ 4.0:
-
- TSFXShade(TWindow* parent, int id, const char far* text,
- int X, int Y, int W, int H, TModule* module = 0);
-
- TSFXShade(TWindow* parent, int resourceId, TModule* module = 0);
-
-
- PASCAL METHODS:
-
- function GetClassName: PChar; virtual;
- - returns the SFX group box class name 'SFXSHADE'.
-
-
- C++ 4.0 MEMBER FUNCTIONS:
-
- char far* GetClassName();
- - returns the SFX group box class name "SFXSHADE".
-
-
-
- ---------------------
- 5. DIVIDERS.
- ---------------------
-
- GLOBAL CLASS NAME: SFXShade
-
- FUNCTION: Vertical and horizontal dividers.
-
- FLAGS:
-
- - Uses the MSH_VHUMP, MSH_VDIP, MSH_HHUMP, MSH_HDIP and
- MSH_BORSTYLE shade flags to specify either a vertical or
- horizontal divider.
-
- OBJECTWINDOWS CLASS: TSFXDivider.
-
- ANCESTOR CLASS: TControl
-
- CONSTRUCTORS:
-
- Pascal:
-
- Init (AParent: PWindowsObject; AnID, X, Y, Length: Integer;
- IsVertical, IsHump, Borstyle: Boolean);
-
- InitResource (AParent: PWindowsObject; ResourceID: Word);
-
- C++ 4.0:
-
- TSFXDivider(TWindow* parent, int id, int x, int y, int length,
- BOOL isVertical, BOOL isHump, BOOL borStyle,
- TModule* module = 0);
-
- TSFXDivider(TWindow* parent, int resourceId, TModule* module = 0);
-
-
- PASCAL METHODS:
-
- function GetClassName: PChar; virtual;
- - returns the SFX shade class name 'SFXSHADE'.
-
-
- C++ 4.0 MEMBER FUNCTIONS:
-
- char far* GetClassName();
- - returns the SFX shade class name "SFXSHADE".
-
-
-
- -----------------
- 6. CHECK BOXES.
- -----------------
-
- GLOBAL CLASS NAME: SFXCheck
-
- FUNCTION: Raised and recessed check boxes.
-
- NEW FEATURES:
-
- - Flicker free painting
-
- FLAGS:
-
- - SFX check boxes use the MBS_XXX button flags. The default style
- is MBS_AUTOCHECKBOX. Other styles are MBS_CHECKBOX, MBS_3STATE
- and MBS_AUTO3STATE. The MBS_LEFTTEXT flag aligns the check box
- text flush left and the check box flush right. The MBS_RAISED
- flag specifies a raised check box. The check mark in a recessed
- check box is a cross and in a raised check box its a tick. The
- MBS_XXX color flags (eg MBS_BLUE) set the check mark color. The
- default color is black. The MBS_DEFFONT flag draws the check box
- text using a fine font.
-
-
- CHECK BOX STYLES:
-
- - Check box
- - Auto check box
- - 3 State
- - Auto 3 State
-
-
- PRIVATE MESSAGES:
-
- - You can use the any of the following messages (defined in
- SFX200.PAS and SFX200.H) with an SFXCheck control:
-
- - WM_SETPEN
- - WM_SFXCTLCOLOR
-
-
- WM_SETPEN:
-
- - You can change the check mark color by sending a check
- box this message in response to a WM_SFXCTLCOLOR message.
- wParam is a handle to a new pen and lParam is zero.
- SFX200.DLL does not delete this pen handle, that's your
- responsibility!
-
-
- WM_SFXCTLCOLOR:
-
- - This message is sent to a parent when an SFX control is about
- to be painted. It is analogous to the WM_CTLCOLOR message.
- wParam contains the check box's display context, the
- LOWORD of lParam contains its window handle and the
- HIWORD of lParam specifies a check box control
- (SFXCTLCOLOR_CHECK).
-
- Pascal Example:
-
- procedure TMyWindow.WMSFXCtlColor (var Msg: TMessage);
- begin
- case Msg.lParamHi of
- SFXCtlColor_Check:
- begin
- SetBkMode(Msg.wParam, Transparent);
- SetTextColor(Msg.wParam, RGB(0,0,128));
- SendMessage(Msg.lParamLo, wm_SetPen,
- GetSFXObject(Green_Pen), 0);
- end;
- end;
- end;
-
- C++ 4.0 Example:
-
- LRESULT
- TMyWindow::EvSFXCtlColor(WPARAM wParam, LPARAM lParam)
- {
- if (HIWORD(lParam) == SFXCTLCOLOR_CHECK)
- {
- ::SetBkMode((HDC)wParam, TRANSPARENT);
- ::SetTextColor((HDC)wParam, TColor(0, 0, 128));
- ::SendMessage((HWND)LOWORD(lParam), WM_SETPEN,
- (UINT)GetSFXObject(GREEN_PEN), 0);
- }
- }
-
-
- OBJECTWINDOWS CLASS: TSFXCheckBox.
-
- ANCESTOR CLASS: TCheckBox.
-
- CONSTRUCTORS:
-
- Pascal:
-
- Init(AParent: PWindowsObject; AnID: Integer; ATitle: PChar;
- X, Y, W, H: Integer; AGroup: PGroupBox);
-
- InitResource (AParent: PWindowsObject; ResourceID: Word);
-
- C++ 4.0:
-
- TSFXCheckBox(TWindow* parent, int id, const char far* title,
- int x, int y, int w, int h, TGroupBox* group,
- TModule* module = 0);
-
- TSFXCheckBox(TWindow* parent, int resourceId, TGroupBox* group,
- TModule* module = 0);
-
- PASCAL METHODS:
-
- function GetClassName: PChar; virtual;
- - returns the SFX check box class name 'SFXCHECK'.
-
-
- C++ 4.0 MEMBER FUNCTIONS:
-
- char far* GetClassName();
- - returns the SFX check box class name "SFXCHECK".
-
-
-
- -----------------
- 7. RADIOBUTTONS.
- -----------------
-
- GLOBAL CLASS NAME: SFXRadio
-
- FUNCTION: Radio buttons
-
- NEW FEATURES:
-
- - Flicker free painting
-
- - Changed the radio buttons so that the check mark
- appears on the left mouse button down message not the left
- button up message. This makes SFX radio buttons work
- better.
-
-
- FLAGS:
-
- - SFX radio buttons use the MBS_XXX button flags. The default
- style is MBS_AUTORADIOBUTTON. The MBS_LEFTTEXT flag aligns the
- radio button text flush left and the radio button flush right.
- The MBS_RAISED flag specifies a raised radio button. The
- MBS_XXX color flags (eg MBS_YELLOW) set the check mark color.
- The default color is black. The MBS_DEFFONT flag draws the radio
- button text using a fine font
-
- RADIOBUTTON STYLES:
-
- - Radiobutton
- - Auto Radiobutton
-
-
- PRIVATE MESSAGES:
-
- - You can use the any of the following messages (defined in
- SFX200.PAS and SFX200.H) with an SFXRadio control:
-
- - WM_SETBRUSH
- - WM_SFXCTLCOLOR
-
-
- WM_SETBRUSH:
-
- - You can change the check mark color by sending a
- radio button this message in response to a WM_SFXCTLCOLOR
- message. wParam is a handle to a new brush and lParam is
- zero. SFX200.DLL does not delete this brush handle. That's
- your responsibility!
-
-
- WM_SFXCTLCOLOR:
-
- - This message is sent to a parent when an SFX control is about
- to be painted. It is analogous to the WM_CTLCOLOR message.
- wParam contains the radio button's display context, the
- LOWORD of lParam contains its window handle and the
- HIWORD of lParam specifies the a radio button control
- (SFXCTLCOLOR_RADIO).
-
- Pascal Example:
-
- procedure TMyWindow.WMSFXCtlColor (var Msg: TMessage);
- begin
- case Msg.lParamHi of
- SFXCtlColor_Radio:
- begin
- SetBkMode(Msg.wParam, Transparent);
- SetTextColor(Msg.wParam, RGB(255,0, 0));
- SendMessage(Msg.lParamLo, wm_SetBrush,
- GetSFXObject(Yellow_Brush), 0);
- end;
- end;
- end;
-
- C++ 4.0 Example:
-
- LRESULT
- TMyWindow::EvSFXCtlColor(WPARAM wParam, LPARAM lParam)
- {
- if (HIWORD(lParam) == SFXCTLCOLOR_RADIO)
- {
- ::SetBkMode((HDC)wParam, TRANSPARENT);
- ::SetTextColor((HDC)wParam, TColor(255, 0, 0));
- ::SendMessage((HWND)LOWORD(lParam), WM_SETBRUSH,
- (UINT)GetSFXObject(YELLOW_BRUSH), 0);
- }
- }
-
-
- OBJECTWINDOWS CLASS: TSFXRadioButton.
-
- ANCESTOR CLASS: TRadioButton
-
- CONSTRUCTORS:
-
- Pascal:
-
- Init(AParent: PWindowsObject; AnID: Integer; ATitle: PChar;
- X, Y, W, H: Integer; AGroup: PGroupBox);
-
- InitResource (AParent: PWindowsObject; ResourceID: Word);
-
- C++ 4.0:
-
- TSFXRadioButton(TWindow* parent, int id, const char far* title,
- int x, int y, int w, int h, TGroupBox* group,
- TModule* module = 0);
-
- TSFXRadioButton(TWindow* parent, int resourceId, TGroupBox* group,
- TModule* module = 0);
-
- PASCAL METHODS:
-
- function GetClassName: PChar; virtual;
- - returns the SFX radio button class name 'SFXRADIO'.
-
-
- C++ 4.0 MEMBER FUNCTIONS:
-
- char far* GetClassName();
- - returns the SFX radio button class name "SFXRADIO".
-
-
-
- -----------------
- 8. SCROLL BARS.
- -----------------
-
- GLOBAL CLASS NAME: SFXScrollBar
-
- FUNCTION: 3-Dimensional Scroll Bars
-
- FLAGS:
-
- - The SFX scroll bar flags MSB_HORZ, MSB_VERT, MSB_TOPLEFT and
- MSB_BOTTOMRIGHT have the same value and meaning as the
- corresponding standard Windows' scroll bar flags.
-
-
- SCROLLBAR STYLES:
-
- - An SFX scroll bar is a subclass of the standard Windows scroll
- bar. It implements all the standard scroll bar behaviour and
- draws a 3D border around the edge of the scroll bar, on the
- parent display context. An SFX scroll bar is used in exactly
- the way as the standard Windows scroll bar.
-
-
- NOTE:
-
- - Because the 3D border is drawn on the parent's display context
- the border may not draw properly inside an SFXShade control.
- If you experience problems either set the shade's background color
- to TRANSPARENT or use a standard Windows scroll bar (+/- inside
- another SFX shade control).
-
-
- OBJECTWINDOWS CLASS: TSFXScrollBar.
-
- ANCESTOR CLASS: TScrollBar
-
- CONSTRUCTORS:
-
- Pascal:
-
- Init(AParent: PWindowsObject; AnID: Integer; X, Y, W, H: Integer;
- IsHScrollBar: Boolean);
-
- InitResource (AParent: PWindowsObject; ResourceID: Word);
-
- C++ 4.0:
-
- TSFXScrollBar(TWindow* parent, int id, int x, int y, int w, int h,
- BOOL isHScrollBar, TModule* module = 0);
-
- TSFXScrollBar(TWindow* parent, int resourceId, TModule* module = 0);
-
-
- PASCAL METHODS:
-
- function GetClassName: PChar; virtual;
- - returns the SFX scroll bar class name 'SFXSCROLLBAR'.
-
-
- C++ 4.0 MEMBER FUNCTIONS:
-
- char far* GetClassName();
- - returns the SFX scroll bar class name "SFXSCROLLBAR".
-
-
- -------------------
- 9. EDIT CONTROLS.
- -------------------
-
- GLOBAL CLASS NAME: SFXEdit
-
- FUNCTION: 3-Dimensional Edit Controls
-
- FLAGS:
-
- - An SFX edit control uses the same flags as the standard Windows
- edit control.
-
-
- SCROLLBAR STYLES:
-
- - An SFX edit control is a subclass of the standard Windows edit
- control. It implements all the standard edit control behaviour
- and draws a 3D border around the edge of the edit control, on
- the parent display context. An SFX edit control is used in
- exactly the same way as the standard Windows edit control.
-
-
- NOTE:
-
- - Because the 3D border is drawn on the parent's display context
- the border may not draw properly inside an SFXShade control.
- If you experience problems either set the shade's background color
- to TRANSPARENT or use a standard Windows edit control (+/- inside
- another SFX shade control).
-
-
- OBJECTWINDOWS CLASS: TSFXEdit.
-
- ANCESTOR CLASS: TEdit
-
- CONSTRUCTORS:
-
- Pascal:
-
- Init(AParent: PWindowsObject; AnID: Integer; ATitle: PChar;
- X, Y, W, H: Integer; ATextLen: Integer; Multiline: Boolean);
-
- InitResource (AParent: PWindowsObject; ResourceID: Word;
- ATextLen: Word);
-
- C++ 4.0:
-
- TSFXEdit(TWindow* parent, int id, const char far* text,
- int x, int y, int w, int h, UINT textLen = 0,
- BOOL multiline = FALSE, TModule* module = 0);
-
- TSFXEdit(TWindow* parent, int resourceId, UINT textLen = 0,
- TModule* module = 0);
-
- PASCAL METHODS:
-
- function GetClassName: PChar; virtual;
- - returns the SFX edit control class name 'SFXEDIT'.
-
-
- C++ 4.0 MEMBER FUNCTIONS:
-
- char far* GetClassName();
- - returns the SFX edit control class name "SFXEDIT".
-
-
-
- ----------------
- 10. LIST BOXES.
- ----------------
-
- GLOBAL CLASS NAME: SFXListBox
-
- FUNCTION: 3-Dimensional list boxes, right mouse button only
- multiple selection list boxes and list edit boxes.
-
-
- NEW FEATURES:
-
- - Added the new LBS_NO3DBORDER flag.
-
-
- FLAGS:
-
- - An SFX list box uses the same flags as the standard Windows
- list box as well as three new flags: LBS_SFXLISTEDIT,
- LBS_SFXMULTIPLESEL, LBS_NO3DBORDER.
-
-
- LIST BOX STYLES:
-
- - An SFX list box is a subclass of the standard Windows list
- box. It implements all the standard list box behaviour and
- draws a 3D border around the edge of the list box, on the
- parent display context. An SFX list box can be used in exactly
- the way as the standard Windows list box or with one of the
- three SFX extended styles: LBS_SFXLISTEDIT, LBS_SFXMULTIPLESEL
- and LBS_NO3DBORDER.
-
-
- LBS_SFXLISTEDIT:
-
- - This style of list box lets the user edit list box items in a
- popup edit control. It supports multiple column list boxes but
- not multiple selection list boxes.
-
- - The following keys are recognised by an SFX list box when
- the LBS_SFXLISTEDIT style flag is set:
-
- Edit mode inactive (list box only):
-
- Key(s) Function
- -------------------------------------------------------
- Backspace Deletes previous item.
- Delete Deletes current item.
- Insert Inserts new (empty) item at current position and
- enters edit mode.
- Return Enters edit mode at currently selected position.
- Space bar Enters edit mode at currently selected position.
-
-
- Edit mode active (popup edit control displayed):
-
- Key(s) Function
- -------------------------------------------------------
- Backspace If item is empty deletes item. If caret is at
- beginning of item it moves to end of previous
- item otherwise it deletes character to the left
- of caret.
-
- Delete If item is empty it deletes item. Otherwise it
- deletes the character to the right of caret.
- Insert Inserts new (empty) item at the current position
- and enters edit mode.
- Return Exits edit mode and moves to next item.
- Left arrow Moves caret to previous character. If caret is
- at beginning of item it moves to end of previous
- item.
- Right arrow Moves caret to next character. If caret is at end
- of item it moves to beginning of next item.
- Up arrow Moves to previous item, maintaining caret position.
- Down arrow Moves to next item, maintaining caret position.
- Page up Moves to top item, maintaining caret position.
- Page down Moves to bottom item, maintaining caret position.
-
-
- - The following mouse messages are recognised by an SFX list
- box when the LBS_SFXLISTEDIT style flag is set:
-
-
- Edit mode inactive (list box only):
-
- Message Function
- --------------------------------------------------------
- WM_LBUTTONDBLCLK Enters edit mode at selected position.
-
-
- Edit mode active (popup edit control displayed):
-
- Message Function
- --------------------------------------------------------
- WM_LBUTTONDOWN If cursor is outside current item edit
- mode moves to selected item
- WM_LBUTTONDBLCLK Exits edit mode.
-
-
- LBS_SFXMULTIPLESEL:
-
- - This style of list box lets the user select multiple items with
- the right mouse button but only single items with the left mouse
- key. The right mouse button up and down messages are not
- passed on so you can't trap them. These messages and WM_MOUSEMOVE
- are used to provide right mouse button multiple selection.
-
-
- LBS_NO3DBORDER:
-
- - This style lets you use an extended SFX list box style
- without a 3D border.
-
-
- NOTE:
-
- - Because the 3D border is drawn on the parent display context
- the border may not draw properly inside an SFXShade control.
- If you experience problems either set the shade's background color
- to TRANSPARENT or specify the new LBS_NO3DBORDER style.
-
-
- PRIVATE MESSAGES:
-
- - There are two private messages used to turn edit mode on and
- off in an list edit box. It is not recommended that you use
- these messages.
-
- - LB_LISTEDITON: wParam should be zero and lParam should be
- the same as lParam in the EM_SETSEL message. This message
- is used to display the edit control.
-
- - LB_LISTEDITOFF: wParam and lParam should be zero.
-
-
- OBJECTWINDOWS CLASS: TSFXListBox.
-
- ANCESTOR CLASS: TListBox
-
- CONSTRUCTORS:
-
- Pascal:
-
- Init(AParent: PWindowsObject; AnID: Integer; X, Y, W, H: Integer);
-
- InitResource (AParent: PWindowsObject; ResourceID: Word);
-
- C++ 4.0:
-
- TSFXListBox(TWindow* parent, int id, int x, int y, int w, int h,
- TModule* module = 0);
-
- TSFXListBox(TWindow* parent, int resourceId, TModule* module = 0);
-
- PASCAL METHODS:
-
- function GetClassName: PChar; virtual;
- - returns the SFX list box class name 'SFXLISTBOX'.
-
- C++ 4.0 MEMBER FUNCTIONS:
-
- char far* GetClassName();
- - returns the SFX list box class name "SFXLISTBOX".
-
-
-
- -----------------
- 11. COMBO BOXES.
- -----------------
-
- GLOBAL CLASS NAME: SFXComboBox
-
- FUNCTION: 3-Dimensional Combo Boxes
-
- FLAGS:
-
- - An SFX combo box uses the same flags as the standard Windows
- combo box as well as one new flag: CBS_NO3DBORDER.
-
-
- COMBO BOX STYLES:
-
- - An SFX combo box is a subclass of the standard Windows combo
- box. It implements all the standard combo box behaviour and
- a 3D border around the edge of the combo box, on the parent
- display context. An SFX combo box can be used in exactly the
- way as the standard Windows combo box.
-
-
- NOTE:
-
- - Because the 3D border is drawn on the parent display context
- the border may not draw properly inside an SFXShade control.
- If you experience problems either set the shade's background color
- to TRANSPARENT or specify the new CBS_NO3DBORDER style.
-
-
- WM_CTLCOLOR:
-
- - A new CTLCOLOR_XXX constant (CTLCOLOR_COMBOBOX) has been added to
- SFX200.DLL and is defined in SFX200.PAS and SFX200.H. You can
- trap this message and use the return value to set the color of
- the edit control and list box.
-
- Pascal Example:
-
- procedure TMyWindow.WMCtlColor (var Msg: TMessage);
- begin
- case Msg.lParamHi of
- CtlColor_Combo:
- begin
- SetBkMode(Msg.wParam, Transparent);
- Msg.Result := GetSFXObject(PokerDot_Brush);
- end;
- end;
- end;
-
- C++ 4.0 Example:
-
- HBRUSH
- TMyWindow::EvCtlColor(HDC hDC, HWND hWndChild, UINT ctlType)
- {
- switch (ctlType)
- {
- case CTLCOLOR_COMBO:
- SetBkMode(hDC, TRANSPARENT);
- return (HBRUSH)GetSFXObject(POKERDOT_BRUSH);
-
- default:
- return TDialog::EvCtlColor(hDC, hWndChild, ctlType);
- }
- }
-
-
- PRIVATE MESSAGES:
-
- - You can use the any of the following messages (defined in
- SFX200.PAS and SFX200.H) with an SFXComboBox control:
-
- - WM_SETBRUSH
- - WM_SFXCTLCOLOR
-
-
- WM_SETBRUSH:
-
- - This message is used for a special purpose. Otherwise it has no
- effect. When you display a drop down combo box in a window or
- dialog box there's an unsightly gap between the right-hand end
- of the combo box's edit control and the button that displays
- the drop down list. You can use WM_SETBRUSH to fill in the gap
- with the window or dialog box background brush. wParam is a
- handle to the background brush and lParam is zero. The default
- brush is light gray.
-
-
- WM_SFXCTLCOLOR:
-
- - This message is sent to a parent when an SFX control is about
- to be painted. It is analogous to the WM_CTLCOLOR message.
- wParam contains the combo box's display context, the
- LOWORD of lParam contains its window handle and the
- HIWORD of lParam specifies the a combo box control
- (SFXCTLCOLOR_COMBO).
-
- Pascal Example:
-
- procedure TMyWindow.WMSFXCtlColor (var Msg: TMessage);
- begin
- case Msg.lParamHi of
- SFXCtlColor_Combo:
- begin
- SetBkMode(Msg.wParam, Transparent);
- SendMessage(Msg.lParamLo, wm_SetBrush,
- GetSFXObject(Steel_Brush), 0);
- end;
- end;
- end;
-
- C++ 4.0 Example:
-
- LRESULT
- TMyWindow::EvSFXCtlColor(WPARAM wParam, LPARAM lParam)
- {
- if (HIWORD(lParam) == SFXCTLCOLOR_COMBO)
- {
- ::SetBkMode((HDC)wParam, TRANSPARENT);
- ::SendMessage((HWND)LOWORD(lParam), WM_SETBRUSH,
- (UINT)GetSFXObject(STEEL_BRUSH), 0);
- }
- }
-
-
- OBJECTWINDOWS CLASS: TSFXComboBox.
-
- ANCESTOR CLASS: TComboBox
-
- CONSTRUCTORS:
-
- Pascal:
-
- Init(AParent: PWindowsObject; AnID: Integer; X, Y, W, H: Integer
- AStyle, ATextLen: Word);
-
- InitResource (AParent: PWindowsObject; ResourceID: Word;
- ATextLen: Word);
-
- C++ 4.0:
-
- TSFXComboBox(TWindow* parent, int id, int x, int y, int w, int h,
- DWORD style, UINT textLen, TModule* module = 0);
-
- TSFXComboBox(TWindow* parent, int resourceId, UINT textLen = 0,
- TModule* module = 0);
-
- PASCAL METHODS:
-
- function GetClassName: PChar; virtual;
- - returns the SFX combo box class name 'SFXCOMBOBOX'.
-
-
- C++ 4.0 MEMBER FUNCTIONS:
-
- char far* GetClassName();
- - returns the SFX combo box class name "SFXCOMBOBOX".
-
-
-
- --------------
- 12. TOOLBARS.
- --------------
-
- GLOBAL CLASS NAME: SFXToolbar
-
- FUNCTION: Child Toolbars, Popup Toolbars, Button Panels and
- Status Bars.
-
- NEW FEATURES:
-
- - Added a status bar option (MTB_STATUS).
-
- - Added 3D frames for child toolbars. It is not necessary to
- specify WS_THICKFRAME or WS_EX_DLGMODALFRAME as the toolbar
- automatically sets the WS_EX_DLGMODALFRAME flag. You only
- need to specify MTB_3DFRAME when you want your child toolbar
- to have a 3D frame (see Object Viewer).
-
- - Confined child toolbars to their parent's client area and popup
- toolbars to Windows' desktop. Toolbars automatically realign
- themselves within these areas when moved outside. This
- realignment occurs in response to a WM_WINDOWPOSCHANGING
- message, so don't override this message, always pass it on
- for default processing.
-
- - Changed the toolbar system menu to display two items: Move and
- Hide. The Hide menu item ID is SC_HIDE and is defined in
- SFX200.PAS and SFX200.H. By adding a ShowWindow function (using
- SW_NORMAL) to your program you can use this feature to show and
- hide popup toolbars.
-
-
- DESIGN PRINCIPLE:
-
- - Understanding the design principles behind the toolbar object
- will help you to appreciate its versatility.
-
- - One thing SFXToolbar was not designed to do is display a lot of
- buttons. Since each button is in fact a separate SFXButton,
- using too many buttons can slow down toolbar painting. About
- twenty seems to be about the best average. (If you need to
- display more of buttons you should think about using a memory
- bitmap and display context, and drawing the toolbar yourself.)
-
- - SFXToolbar was designed as a multi-purpose toolbar object
- that could be used as a popup toolbar, a child toolbar or a
- status bar. It had to optionally display standard Borland-style
- buttons so dialog box button panels could be created (like the
- ones used in the common dialog box templates in SFX200.DLL),
- and it had to be a control that could be added to a
- dialog box in Resource Workshop. The only way to create a toolbar
- as a RW control was to pass the real toolbar title and button
- ID's in the toolbar's window text.
-
-
- FLAGS:
-
- - The MTB_ROWXX (MTB_ROW1 to MTB_ROW15) and MTB_COLUMNXX
- (MTB_COLUMN1 to MTB_COLUMN15) flags specify the number of
- vertical rows and horizontal columns of buttons. While the
- theoretical maximum is 225 (15 x 15) the actual maximum is the
- number of button ID's that will fit into a 256 byte window
- text string. This works out to be about 60. The MTB_TOP,
- MTB_LEFT, MTB_RIGHT, MTB_BOTTOM, MTB_FLOAT and MTB_STATUS flags
- specify the toolbar orientation (or style). The MTB_3DFRAME flag
- draws a 3D frame around the toolbar. The MTB_FLUSH flag draws a
- flush border around the toolbar (like SFXButton). The MTB_RADIO
- flag makes the toolbar buttons behave as a set of mutually
- exclusive radio buttons. This style was used in the Object
- Viewer toolbar. The default toolbar button style is the
- Borland-style bitmap button. Specifying the MTB_BITMAPBUTTON
- flag uses the MBS_BITMAPBUTTON style.
-
- - To set up a toolbar you must at least specify an MTB_ROWXX, an
- MTB_COLUMNXX flag and one of the style flags MTB_TOP, MTB_LEFT,
- MTB_RIGHT, MTB_BOTTOM, MTB_FLOAT or MTB_STATUS. The other
- flags are optional.
-
-
- BITMAP RESOURCE IDENTIFIERS:
-
- - Bitmap ID's for the toolbar buttons should follow the Borland
- numbering system:
-
- 1000 + button ID (up bitmap)
- 3000 + button ID (down bitmap)
- 5000 + button ID (focussed bitmap)
-
- CGA and EGA bitmaps are not supported.
-
-
- TOOLBAR BUTTON ID'S:
-
- - Button ID's should be between 100 and 999. Numbers 0 to 99 are
- reserved for use by SFX200.DLL. The help button ID is 8 not
- 998. The previous conflict that occurred with Borland's help
- button ID in RC files has been fixed in the new version of
- SFX200.H. ID's 1 to 11 display one of the standard bitmap
- buttons in SFX200.DLL.
-
- - The button ID's should be unique in the dialog or window.
-
-
- BUTTON SIZE:
-
- - The size of the first button's bitmap is used to set the size
- of the toolbar buttons and the toolbar. If the default Borland-
- style buttons are used the toolbar buttons are the same size as
- the first bitmap. If the MTB_BITMAPBUTTON style is used the buttons
- are 6 pixles bigger in width and height than the first bitmap -
- to make room for the button border.
-
-
- THE TOOLBAR TITLE:
-
- - To set up a toolbar with 4 single-bitmap buttons using the
- ID's 101, 102, 103 and 104 you must use 4 bitmaps with the ID's
- 1101, 1102, 1103 and 1104. You pass all the button ID's in the
- toolbar's title, separated from the 'real' toolbar title and
- each other by a comma. (eg Tools,101,102,103,104)
-
- - Before a toolbar is displayed it parses the window title.
- All the characters in the title up to the first comma are
- displayed as the 'real' toolbar title. If the toolbar has no
- caption you can use a '?' instead. If you use a question mark
- with a popup toolbar the caption will be blank.
- (eg ?,101,102,103,104)
-
- - The original window text is stored in global memory and can be
- retrieved using the GetWindowWord function and the index
- MTB_WNDTEXT. The global text string is updated if any of the
- buttons ID's (and bitmaps) are changed.
-
-
- TOOLBAR STYLES:
-
- - There are six toolbar styles:
-
- - a top aligned toolbar,
- - a left aligned toolbar,
- - a right aligned toolbar,
- - a bottom aligned toolbar,
- - a floating toolbar
- - and a status bar
-
-
- ALIGNED TOOLBARS:
-
- - An aligned toolbar aligns itself either along the top, left
- right or bottom edge of its parent's client area. A static
- control is created to fill in the gap between the last button
- and the opposite edge of the client area. The window handle of
- the static control can be retrieved using the GetWindowWord
- function and the index MTB_WNDSTATIC (eg to set the status bar
- text).
-
- - You need to send the toolbar a WM_ALIGNTOOLBAR message
- every time its parent is resized. The ObjectWindows TSFXToolbar
- object has an 'AlignToolbar' function that sends this message for
- you.
-
- - In response to a WM_ALIGNTOOLBAR message a toolbar realigns
- and redraws itself. Left and top aligned toolbars redraw only
- that part of the toolbar that has changed. Right and bottom
- aligned toolbars and status bars redraw the entire toolbar.
-
- - The only way to change the alignment of a toolbar is to destroy
- it and create a new one in the required position (this is how
- the Object Viewer does it.)
-
-
- STATUS BARS:
-
- - A status bar is just a 'reversed' bottom-aligned toolbar that
- lets you display text on the left and some buttons on the
- right. You will need to set the status bar font if you don't
- want to use Windows' default system font. You can retrieve the
- window handle of the static control using 'GetWindowWord', if
- you want to send the static control a WM_SETFONT message. The
- ObjectWindows TSFXToolbar object has a 'SetFont' function that
- sends this message for you.
-
- - You can use tab characters to space out the text displayed
- in a status bar, eg "\t" in C++ and "#9" in Pascal.
-
-
- FLOATING TOOLBARS:
-
- - A floating toolbar is either a child toolbar displayed somewhere
- inside its parent's client area or a popup toolbar. Floating
- toolbars can have a caption and/or a 3D frame. A floating
- toolbar will be fixed if it has no caption.
-
-
- RADIOBUTTON STYLE TOOLBARS:
-
- - By specifying the MTB_RADIO flag you force the toolbar
- buttons to operate as a mutually exclusive set of radio buttons.
-
-
- KEYBOARD INTERFACE:
-
- - The following keys are recognised by an SFX toolbar when
- it has the input focus.
-
- Key(s) Function
- -------------------------------------------------------
- Up arrow Moves focus to previous tool.
- Left arrow Moves focus to previous tool.
- Right arrow Moves focus to next tool.
- Down arrow Moves focus to next tool.
- Space bar Selects tool that has the input focus. Same
- as selecting tool with left mouse button.
-
- To visually appreciate the changing focus you will need to
- supply a focussed bitmap (5000 + button ID) for each toolbar
- button.
-
- - A 'child toolbar with a caption' doesn't recognise the
- WS_TABSTOP and WS_GROUP styles, so the tab key wont work. This
- is because the WS_TABSTOP style is the same as WS_MINIMIZEBOX
- and WS_GROUP is the same as the WS_MAXIMIZEBOX. Specifying
- either WS_TABSTOP or WS_GROUP would cause a minimize and/or
- maximize box to appear in the child toolbar's caption. Since
- this is inappropriate these flags have been disabled. This
- toolbar style was used in the Object Viewer's 'Message and
- Input Boxes' dialog box.
-
-
- WM_COMMAND:
-
- - For convenience, the WM_COMMAND message created when a toolbar
- button is pressed is processed by the toolbar first then passed
- onto the toolbar's parent. You can either respond to a toolbar
- button's BN_CLICKED notification in the toolbar's message response
- or its parent's. wParam contains the control ID, LOWORD(lParam)
- contains the button handle and HIWORD(lParam) contains the
- BN_CLICKED notification code.
-
-
- WM_RBUTTONDOWN and WM_MOUSEMOVE:
-
- - For convenience a toolbar button passes both its WM_RBUTTONDOWN
- and WM_MOUSEMOVE messages to the toolbar, after its processed
- them. The LOWORD of lParam contains the x-coordinate and the
- HIWORD of lParam contains the y-coordinate of the cursor
- position in 'TOOLBAR CLIENT AREA COORDINATES', not button
- coordinates. You can use the 'ChildWindowFromPoint' function
- to retrieve the window handle of the button in this position
-
-
- PRIVATE MESSAGES:
-
- - You can use the any of the following messages (defined in
- SFX200.PAS and SFX200.H) with an SFXToolbar object:
-
- - WM_ALIGNTOOLBAR (realigns an aligned toolbar)
- - WM_GETCHECK (radiobutton style toolbars only)
- - WM_SETCHECK (radiobutton style toolbars only)
- - WM_SETBITMAP
-
- The ObjectWindows TSFXToolbar class has functions that send
- these messages for you.
-
-
- WM_GETCHECK:
-
- - This message retrieves the check state of a toolbar button.
- wParam is the ID of the button whose check state is to be
- retrieved. The return value is zero if the button is unchecked
- (up) and non-zero if its checked (down).
-
-
- WM_SETCHECK:
-
- - This message is sent to a toolbar button to change its check state.
- If lParam is zero the button is unchecked (up), if its non-zero
- it's checked (down).
-
-
- WM_SETBITMAP:
-
- - This message is sent to a toolbar to change the ID and
- associated bitmap(s) of one of its buttons. wParam is the new
- button ID and lParam is the current button ID.
-
-
- HINTS:
-
- - The WS_BORDER style should only be used with raised floating
- toolbars. If you specify this style for an aligned toolbar,
- the aligned toolbar will have an ugly double black border.
- Specifying WS_CAPTION implicitly specifies WS_BORDER.
-
- - The MTB_FLUSH style was added because recessed toolbars look
- better in an MWS_SFXFRAME style window/dialog than a raised
- toolbar (one with no flush border). An aligned toolbar in an
- MWS_SFXFRAME window is offset by 1 pixel from the top of its
- parent's client rectangle, so it blends in with the surrounding
- window frame and doesn't interfere with the drawing of the
- 3D window caption. Personally, I don't like top align toolbars
- in an MWS_SFXFRAME window or dialog, they just don't look right.
- I prefer a bottom aligned toolbar, a status bar or a floating
- button panel.
-
- - Don't use the MTB_FLUSH style with aligned toolbars in a
- non-MWS_SFXFRAME window or dialog. It doesn't look good.
-
- - When adding an aligned toolbar to an MWS_3DFRAME window with a
- raised client area, the border of the raised client area will
- overlap the top border of the toolbar, cutting off the top button
- edges. It looks better if you use a null client rectangle and draw
- the raised client area yourself.
-
- - To draw the raised client area yourself fill the background with
- a NULL_BRUSH. Place the toolbar in the window +/- a status bar.
- In your paint function use the DrawBorder or Draw3DBorder
- function to draw a raised border around the remaining exposed
- client area, so that the raised border just touches the edge of
- the toolbar (same for status bar) leaving one black line (not
- two) between them. Then deflate the exposed client rectangle
- by the border thickness using the InflateRect function
- and fill in the remaining client area inside the raised border
- (not under it). This makes the toolbar, the status bar and the
- raised client area fit together like the blocks in a chocolate
- bar. Filling in the exposed client rectangle first, then
- drawing a raised border around it causes too much flicker.
- (See WinTool Demonstration.)
-
-
- OBJECTWINDOWS CLASS: TSFXToolbar.
-
- ANCESTOR CLASS: TWindow.
-
- CONSTRUCTORS:
-
- Pascal:
-
- Init (AParent: PWindowsObject; AnID: Integer; ATitle: PChar;
- X, Y: Integer; IsChild: Boolean);
-
- InitResource (AParent: PWindowsObject; ResourceID: Word);
-
- C++ 4.0:
-
- TSFXToolbar(TWindow* parent, int id, const char far* title, int x, int y,
- BOOL isChild = TRUE, TModule* module = 0);
-
- TSFXToolbar(TWindow* parent, int resourceId, TModule* module = 0);
-
- - If 'isChild' is TRUE the toolbar is a child toolbar.
- Otherwise its a popup toolbar.
-
- - Only the X and Y coordinates for the top-left corner of the
- toolbar are required as the toolbar resizes itself depending on
- the number and size of the bitmaps used.
-
-
- PASCAL METHODS:
-
- function GetClassName: PChar; virtual;
- - returns the SFX toolbar class name 'SFXTOOLBAR'.
-
- function Register: Boolean; virtual;
- - returns TRUE to indicate that TSFXToolbar uses the
- predefined global Windows class SFXTOOLBAR
-
- procedure WMPaint (var Msg: TMessage); virtual wm_First + wm_Paint;
- - Overrides TWindow's paint method to return DefWndProc(Msg);
-
- procedure GetTitle (ATextString: PChar);
- - Retrieves the full text string used to create the toolbar.
-
- procedure AlignToolbar;
- - Realigns a toolbar along the top, left, right or bottom
- of its parent's client rectangle.
-
- function GetCheck (ToolID: Integer): Word;
- - returns the check state of a radiobutton-style toolbar button
- identifed by ToolID (either BF_CHECKED or BF_UNCHECKED).
-
- procedure CheckTool (ToolID: Integer);
- - Checks the tool identified by ToolID so that it appears
- depressed. If any other tool is checked it is unchecked
- and redrawn so that it appears raised.
-
- procedure UncheckTool (ToolID: Integer);
- - Unchecks the tool identified by ToolID so that it appears
- raised.
-
- function IsToolEnabled(ToolID: Integer): BOOL;
- - returns TRUE if the tool identifed by ToolID is
- enabled. Otherwise it returns FALSE.
-
- procedure EnableTool(ToolID: Integer; Enabled: BOOL);
- - Enables or disables the tool identified by ToolID. If
- 'Enabled' is TRUE ToolID is enabled. If its FALSE its
- disabled.
-
- procedure GetText (ATextString: PChar);
- - Retrieves the Static control text in an aligned toolbar or
- status bar
-
- procedure SetText (ATextString: PChar);
- - sets the status bar text to 'ATextString'.
-
- procedure SetFont (Font: HFont);
- - sets the status bar font to 'Font'.
-
- procedure SetTool (AnID, ToolID: Integer);
- - changes the ID of the button identifed by ToolID to AnID
- and changes the bitmaps, if any.
-
- function StatusWindow: HWnd;
- - Retrieves the window handle of the toolbar's static control
-
-
- C++ 4.0 MEMBER FUNCTIONS:
-
- virtual int GetId();
- - returns the toolbar id (Attr.Id);
-
- char far* GetClassName();
- - returns the SFX toolbar class name "SFXTOOLBAR".
-
- void EvPaint();
- - Overrides TWindow's paint method to return
- DefaultProcessing();
-
- void GetTitle(char far* str);
- - Retrieves the full text string used to create the toolbar.
-
- void AlignToolbar();
- - Realigns a toolbar along the top, left, right or bottom
- of its parent's client rectangle.
-
- UINT GetCheck(int toolId);
- - returns the check state of a radiobutton-style toolbar button
- identifed by ToolId (either BF_CHECKED or BF_UNCHECKED).
-
- void CheckTool(int toolId);
- - Checks the tool identified by ToolId so that it appears
- depressed. If any other tool is checked it is unchecked
- and redrawn so that it appears raised.
-
- void UncheckTool(int toolId);
- - Unchecks the tool identified by ToolId so that it appears
- raised.
-
- BOOL IsToolEnabled(int toolId);
- - returns TRUE if the tool identifed by ToolId is
- enabled. Otherwise it returns FALSE.
-
- void EnableTool(int toolId, BOOL enabled);
- - Enables or disables the tool identified by ToolId. If
- 'enabled' is TRUE ToolId is enabled. If its FALSE its
- disabled.
-
- void GetText(char far* str);
- - Retrieves the Static control text in an aligned toolbar or
- status bar
-
- void SetText(const char far* str);
- - sets the status bar text to 'str'.
-
- void SetFont(HFONT font);
- - sets the status bar font to 'font'.
-
- void SetTool(int newId, int toolId);
- - changes the Id of the button identifed by ToolId to AnId
- and changes the bitmaps, if any.
-
- HWND StatusWindow();
- - Retrieves the window handle of the toolbar's static control
-
-
-
- --------------------
- 13. Percent Gauges.
- --------------------
-
- GLOBAL CLASS NAME: SFXPercent
-
- FUNCTION: Horizontal 3-Dimensional Percent Gauge
-
- FLAGS:
-
- - The MPS_TOP flag aligns the top edge of the percent gauge along
- the top edge of the rectangle given in the CreateWindow
- function. The percent gauge uses the default height for percent
- gauges.
-
- - The MPS_BOTTOM aligns the bottom edge of the percent gauge
- along the bottom edge of the rectangle given in the
- CreateWindow function. The percent gauge uses the default
- height for percent gauges.
-
- - If neither MPS_TOP or MPS_BOTTOM are specified the percent
- gauge fills the rectangle specified in the CreateWindow
- function.
-
-
- PERCENT GAUGE STYLES:
-
- - Only horizontal percent gauges are supported.
-
-
- PRIVATE MESSAGES:
-
- - You can use the any of the following messages (defined in
- SFX200.PAS and SFX200.H) with an SFXPercent control:
-
- - WM_DRAWPERCENT
- - WM_RESETPERCENT
- - WM_SETBRUSH
- - WM_SFXCTLCOLOR
-
-
- WM_DRAWPERCENT:
-
- - This message is sent to a percent gauge to tell it what
- percentage to draw. wParam specifies the percentage to draw and
- must be a value within the range 0 to 100%. lParam is zero. The
- return value is 1 when the percentage drawn reaches 100
- (complete). Otherwise, it is zero. (See Object Viewer source.)
-
-
- WM_RESETPERCENT:
-
- - This message is sent to a percent gauge to reset the percentage
- drawn to zero. This message has no parameters.
-
-
- WM_SETBRUSH:
-
- - You can use this message to set the brush used to paint the
- client area of the gauge. The default is a special off-white
- brush created on the fly. This message is best sent to a percent
- gauge in response to the WM_SFXCTLCOLOR message.
-
-
- WM_SFXCTLCOLOR:
-
- - This message is sent to a parent when an SFX control is about
- to be painted. It is analogous to the WM_CTLCOLOR message.
- wParam contains the percent gauge's display context, the
- LOWORD of lParam contains its window handle and the
- HIWORD of lParam specifies the a percent gauge control
- (SFXCTLCOLOR_PERCENT).
-
- Pascal Example:
-
- procedure TMyWindow.WMSFXCtlColor (var Msg: TMessage);
- begin
- case Msg.lParamHi of
- SFXCtlColor_Percent:
- begin
- SetBkMode(Msg.wParam, Transparent);
- SetTextColor(Msg.wParam, RGB(128, 0, 128);
- SendMessage(Msg.lParamLo, wm_SetBrush,
- GetSFXObject(Blue_Brush), 0);
- end;
- end;
- end;
-
- C++ 4.0 Example:
-
- LRESULT
- TMyWindow::EvSFXCtlColor(WPARAM wParam, LPARAM lParam)
- {
- if (HIWORD(lParam) == SFXCTLCOLOR_PERCENT)
- {
- ::SetBkMode((HDC)wParam, TRANSPARENT);
- ::SetTextColor((HDC)wParam, RGB(128, 0, 128));
- ::SendMessage((HWND)LOWORD(lParam), WM_SETBRUSH,
- (UINT)GetSFXObject(BLUE_BRUSH), 0);
- }
- }
-
-
- OBJECTWINDOWS CLASS: TSFXPercent.
-
- ANCESTOR CLASS: TWindow.
-
- CONSTRUCTORS:
-
- Pascal:
-
- Init (AParent: PWindowsObject; AnID: Integer; X, Y, W, H: Integer);
-
- InitResource (AParent: PWindowsObject; ResourceID: Word);
-
- C++ 4.0:
-
- TSFXPercent(TWindow* parent, int id, int x, int y, int w, int h,
- TModule* module = 0);
-
- PASCAL METHODS:
-
- function GetClassName: PChar; virtual;
- - returns the SFX percent class name 'SFXPERCENT'.
-
- function SetPercent (Percent: Word): LongInt;
- - draws the percentage amount specified by Percent and
- must be in the range 0 to 100%. The return value is
- one when the percentage drawn reaches 100. Otherwise its
- zero.
-
- procedure Reset;
- - resets the percentage drawn to zero.
-
-
- C++ 4.0 MEMBER FUNCTIONS:
-
- char far* GetClassName();
- - returns the SFX percent class name "SFXPERCENT".
-
- LONG SetPercent(UINT percent);
- - draws the percentage amount specifed by 'percent' and
- must be in the range 0 to 100%. The return value is
- one when the percentage drawn reaches 100. Otherwise its
- zero.
-
- void Reset();
- - resets the percentage drawn to zero.
-
-
-
- -------------------
- 14. MDI CLIENTS.
- -------------------
-
- GLOBAL CLASS NAME: SFXMDIClient, SFX3DMDIClient
-
- FUNCTION: Alternative MDI client windows.
-
- MDICLIENT STYLES:
-
- - There are two MDI client window styles. An SFXMDIClient is
- light gray and should be used with an MWS_SFXFRAME style
- MDI window. An SFX3DMDIClient is the color specified by the
- constant COLOR_WINDOW. It can be used with all MDI window
- styles except MWS_SFXFRAME.
-
-
- OBJECTWINDOWS CLASS: TSFXMDIClient.
-
- ANCESTOR CLASS: TMDIClient.
-
- CONSTRUCTORS:
-
- Pascal:
-
- Init (AParent: PMDIWindow; SFXClient: Boolean);
-
- C++ 4.0:
-
- TSFXMDIClient (BOOL sfxClient = FALSE, TModule* module = 0);
-
- - If sfxClient is TRUE GetClassName returns the global class
- name 'SFXMDICLIENT'. If its FALSE it returns 'SFX3DMDICLIENT';
-
- PASCAL METHODS:
-
- function GetClassName: PChar; virtual;
- - returns the SFX MDI client class name 'SFXMDIClient' or
- 'SFX3DMDIClient'.
-
-
- C++ 4.0 MEMBER FUNCTIONS:
-
- char far* GetClassName();
- - returns the SFX MDI client class name "SFXMDIClient" or
- "SFX3DMDIClient".
-
-
-
- -------------------
- 15. DIALOG BOXES.
- -------------------
-
- GLOBAL CLASS NAMES: SFXDlg, SFX3DDlg, SFXGlazeDlg,
- SFXGrayDlg, SFXSteelDlg.
-
- FUNCTION: 3-Dimensional custom dialog boxes.
-
- NEW FEATURES:
-
- - Added Chicago-style title bars that display a miniature class
- icon on a title bar, next to the system menu control box, and
- an adjacent left aligned caption. This style is specified using
- the new MWS_SFXCAPTION flag (See Object Viewer or Resource
- Workshop for an example).
-
- - Implemented a new non-client area paint function that removes
- the previous window frame flicker.
-
-
- FLAGS:
-
- - The new MWS_SFXCAPTION flag is the old MWS_FLATCLIENT flag. Old
- windows specifying one of the previous MWS_FLATTXXX flags will
- automatically display an SFX caption. The MWS_FLATCLIENT style
- has been made the default (so its flag is no longer needed) and
- its combined styles have been assigned to other flags (for backward
- compatibility).
-
- - As well as the standard window and dialog WS_XXX flags, SFX dialogs
- use the ObjectMate window style flags:
-
- - MWS_SFXCAPTION Chicago-style title bars.
- - MWS_FRAMEDCLIENT 3D raised frame drawn around client area.
- - MWS_RAISEDCLIENT 3D raised border drawn around client area.
- - MWS_GRAY Light gray client area (default)
- - MWS_3DFRAME 3D window frame.
- - MWS_3DGRAY Light gray client area and a 3D
- window frame.
- - MWS_SFXFRAME Special 3D frame.
- - MWS_GLAZE Fills client area with a GLAZE_BRUSH only
- if the class brush is set to zero.
- - MWS_STEEL Fills client area with a STEEL_BRUSH only
- if the class brush is set to zero.
- - MWS_3DGLAZE MWS_GLAZE + MWS_3DFRAME
- - MWS_3DSTEEL MWS_STEEL + MWS_3DFRAME
- - MWS_FRAMED3DFRAME MWS_3DFRAME + MWS_FRAMEDCLIENT
- - MWS_FRAMED3DGLAZE MWS_3DGLAZE + MWS_FRAMEDCLIENT
- - MWS_FRAMED3DSTEEL MWS_3DSTEEL + MWS_FRAMEDCLIENT
- - MWS_RAISED3DFRAME MWS_3DFRAME + MWS_RAISEDCLIENT
- - MWS_RAISED3DGLAZE MWS_3DGLAZE + MWS_RAISEDCLIENT
- - MWS_RAISED3DSTEEL MWS_3DSTEEL + MWS_RAISEDCLIENT
-
- - Old window style flags included for compatibility
-
- - MWS_FLAT3DFRAME Same as MWS_3DFRAME.
- - MWS_FLAT3DGLAZE Same as MWS_3DGLAZE.
- - MWS_FLAT3DSTEEL Same as MWS_3DSTEEL.
-
- - The MWS_SFXFRAME style overrides all other MWS_XXX style flags.
-
- - If the MWS_SFXCAPTION flag is set and the dialog doesn't
- have its own icon it displays the application's class icon
- in its title bar. You can specify a custom icon by sending
- the dialog box a WM_SETBITMAP message. wParam is a valid
- icon handle and lParam specifies whether to shrink the icon.
-
-
- DIALOG STYLES:
-
- - SFX200.DLL registers five custom dialog classes: SFXDlg,
- SFX3DDlg, SFXGlazeDlg, SFXGrayDlg and SFXSteelDlg and defines
- its own default custom dialog box function: SFXDefDlgProc.
-
-
- THE 'SFXDLG' USER-DEFINED DIALOG CLASS:
-
- - The SFXDlg class displays a dialog box that lets you define its
- style using the ObjectMate window style flags. The default
- dialog box style displays a modal frame with a flat light gray
- client area. Other possible custom styles include any
- combination of the following:
-
- - a Flat, Raised or Framed client area.
-
- - a modal frame, a thick frame, an SFXFrame or 3DFrame.
-
- - a Light gray client area, a Glazed client area , a Steel
- client area or your own custom brush.
-
- - To use the SFXDlg class in your application do the following:
-
- 1. Enter SFXDlg as the dialog class in the Window style dialog
- box in Resource Workshop.
-
- 2. Pass the window style flag or combined style flags as the
- dwInitParam parameter of the CreateDialogParam,
- CreateDialogIndirectParam, DialogBoxParam or
- DialogBoxIndiectParam functions.
-
- or
-
- Pass the window style flag or combined style flags as the
- Attr.Param parameter in your ObjectWindows TDialog descendant's
- constructor.
-
-
- PREDEFINED DIALOG CLASSES:
-
- - The other four custom dialog classes SFX3DDlg, SFXGlazeDlg,
- SFXGrayDlg and SFXSteelDlg are predefined classes that do not
- require the use of style flags. Use these dialog classes as you
- would Borland's BorDlg class.
-
- - To use the SFX3DDlg, SFXGlazeDlg, SFXGrayDlg and SFXSteelDlg
- dialog classes in your application do the following:
-
-
- 1. Enter SFX3DDlg, SFXGlazeDlg, SFXGrayDlg or SFXSteelDlg
- as the dialog class in the Window style dialog box in
- Resource Workshop.
-
- 2. Derive any ObjectWindows dialog class from TDialog.
-
- - You can use the SFX3DDlg, SFXGlazeDlg, SFXGrayDlg and
- SFXSteelDlg classes to modify existing applications.
-
-
- RESOURCE WORKSHOP LIMITATION:
-
- - Resource Workshop does not display custom dialogs in its IDE
- other than its own 'BorDlg' class. This limitation means that
- SFX custom dialog styles are only visible at run time.
-
-
- DEFAULT DIALOG FUNCTION:
-
- - SFX dialogs have their own default dialog function:
- SFXDefDlgProc. This function must handles the following
- messages:
-
- WM_CREATE
- WM_COMMAND
- WM_CTLCOLOR
- WM_DESTROY
- WM_ERASEBKGND
- WM_GETMINMAXINFO
- WM_GETTEXT
- WM_INITDIALOG
- WM_LBUTTONDOWN
- WM_NCLBUTTONDOWN
- WM_NCCALCSIZE
- WM_NCPAINT
- WM_SETBITMAP (Private message to set caption icon)
- WM_SETBRUSH (Private message to set background brush)
- WM_SETTEXT
-
- - WM_GETMINMAXINFO is used to limit the maximized dialog size
- to the width and height of the screen. This looks better with
- 3-dimensional dialog styles.
-
- - Like the default window and MDI window functions, the most
- important thing SFXDefDlgProc does is draw a dialog's
- non-client area and control its activation state.
-
- - When you subclass a standard combo box you loose control of the
- popup list box and it wont display properly. The WM_COMMAND,
- WM_LBUTTONDOWN and WM_NCLBUTTONDOWN messages in SFXDefDlgProc
- supply part of the routine used for handling an SFX combo
- box's popup list box correctly. The rest of the routine is
- written into the SFXComboBox class.
-
- - Because SFXDefDlgProc draws the dialog's non-client area it
- also has to draw the dialog title. The WM_GETTEXT and
- WM_SETTEXT messages are used to set, store and retrieve a
- dialog's title. If you don't pass the messages on for default
- processing your dialog title will display garbage (ie %#(&$!)
-
- PRIVATE MESSAGES:
-
- - You can use the any of the following messages (defined in
- SFX200.PAS and SFX200.H) with an SFX dialogs:
-
- - WM_SETBITMAP
- - WM_SETBRUSH
- - WM_SFXCTLCOLOR
-
-
- WM_SETBITMAP:
-
- - This message to sent to set the icon you want an MWS_SFXCAPTION
- style dialog box to display in its title bar. wParam must be a
- valid icon handle. If lParam is zero the icon is shrunk to an
- area 'GetSystemMetrics(SM_CYCAPTION)' in width and
- 'GetSystemMetrics(SM_CYCAPTION) - 4' in height and is
- vertically centered in the title bar. If lParam is a value
- greater than zero (eg 1) the icon is not shrunk. Instead, only
- part of the icon is drawn, starting at the top-left corner, to
- an area 'GetSystemMetrics(SM_CYCAPTION)' in width and
- 'GetSystemMetrics(SM_CYCAPTION) - 4' in height. If you
- use this feature to display an undistorted miniature picture in
- a title bar, only draw in the top-left area of the icon that
- corresponds to the above dimensions.
-
- - If the function GetSystemMetrics(SM_CYSIZE) returns a value of 26
- (ie high screen resolution) the area of the icon displayed on the
- title bar is 28 by 24 pixels. Otherwise (low screen resolution)
- the area is 21 by 17 pixels.
-
- - If you set lParam to a value greater than zero and you want
- your icon image to display correctly you need to supply to two
- icons. One with the image drawn in an area 21 x 17 pixels and
- one drawn in an area 28 x 24 pixels. Then, depending on the value
- returned by GetSystemMetric(SM_CYSIZE) you should load the
- appropriate icon (see Object Viewer source code and resource
- file).
-
-
- WM_SETBRUSH:
-
- - You can specify your own background brush by sending the dialog
- box a WM_SETBRUSH message in response to a WM_SFXCTLCOLOR
- message. wParam contains a valid brush handle and lParam is 0.
-
-
- WM_SFXCTLCOLOR:
-
- - An SFX dialog sends this message to itself when it's about
- to be painted. It is analogous to the WM_CTLCOLOR message.
- wParam contains the dialog box's display context, the
- LOWORD of lParam contains its window handle and the
- HIWORD of lParam specifies the a dialog box (SFXCTLCOLOR_DLG).
-
- Pascal Example:
-
- procedure TMyDialog.WMSFXCtlColor (var Msg: TMessage);
- begin
- case Msg.lParamHi of
- SFXCtlColor_Dlg:
- begin
- SetBkMode(Msg.wParam, Transparent);
- SendMessage(Msg.lParamLo, wm_SetBrush,
- GetSFXObject(Wire_Brush), 0);
- end;
- end;
- end;
-
- C++ 4.0 Example:
-
- LRESULT
- TMyDialog::EvSFXCtlColor(WPARAM wParam, LPARAM lParam)
- {
- if (HIWORD(lParam) == SFXCTLCOLOR_DLG)
- {
- ::SetBkMode((HDC)wParam, TRANSPARENT);
- ::SendMessage((HWND)LOWORD(lParam), WM_SETBRUSH,
- (UINT)GetSFXObject(WIRE_BRUSH), 0);
- }
- }
-
-
- OBJECTWINDOWS CLASS: None. Use the standard TDialog class
- (and Pascal TDlgWindow class).
-
-
-
- ------------------------
- 16. COMMON DIALOG BOXES.
- ------------------------
-
- NEW FEATURES:
-
- - Refined all common dialog box templates so they look better.
-
- - Provided in-built messages to handle the standard Apply and
- Help buttons, so you don't have to worry about hooks.
-
- - Added File Information, Delete File and Create Directory features
- to the file open/save dialogs.
-
- - Added an 'Apply' button to the Color dialog box that lets you
- update a color without closing the dialog box. This button is
- handled automatically by SFX200.DLL.
-
- - Added the SFXOpenFile, SFXSaveFile, SFXChooseColor and
- SFXChooseFont common dialog box functions. These functions can
- be used instead of formal common dialog box structures or
- OWL 2.0 common dialog box classes.
-
- - Added an "open file" style directory selection dialog box. This
- dialog box can be displayed using the SFXDirBox function or the
- new SFXOpenDir function. It returns the user-selected directory
- string.
-
- - Redesigned the extended style font dialog box.
-
-
- TEMPLATE STYLES:
-
- - SFX200.DLL provides you with an extended set of common dialog
- box templates in each of the four custom dialog styles:
- SFX3DDlg, SFXGlazeDlg, SFXGrayDlg and SFXSteelDlg. Each style
- has 11 templates: 7 standard templates and 4 customized (or
- extended style) templates. (You can view all the common dialog
- box templates in the Object Viewer.)
-
-
- TEMPLATE ID'S:
-
- - The following template ID's are used in the GetSFXTemplate and
- GetSFXTemplateId functions to identify which template to load.
-
- DLG_COLOR Choose color dialog box.
- DLG_EXCOLOR Extended choose color.
- DLG_OPENSAVE Open save dialog box.
- DLG_EXOPENSAVE Open save with extended file selection.
- DLG_PRINT Print dialog box.
- DLG_PRINTSETUP Print setup dialog box.
- DLG_FIND Find dialog box
- DLG_REPLACE Replace dialog box.
- DLG_FONT Font dialog box.
- DLG_EXFONT Extended font dialog box
- DLG_OPENDIR Directory selection dialog box
-
-
- SETTING THE REQUIRED STACK SIZE:
-
- - Applications using common dialog boxes should specify at
- least 8192 bytes for the stack size.
-
-
- OPEN AND SAVE AS DIALOG BOXES:
-
- - File Information, Delete File and Create Directory features
- have been added to the file open and save as dialog boxes.
-
- - File information is automatically displayed in the 'File
- Information' panel for the currently selected file.
-
- - A 'delete' button appears in the 'Open File' dialog box. You
- can use this button to delete selected single or multiple files.
-
- - A 'CreateDir' button appears in the 'Save File As' dialog box.
- You can use this button to create a new directory prior to
- saving a file. To create a new subdirectory in the current
- directory enter the subdirectory name. To create a
- new subdirectory in a different directory enter the new
- subdirectory path. The CreateDir button only appears in the
- 'Save File As' dialog box if the word 'save' is part of the
- dialog box title.
-
- - The help button is automatically activated by specifying the
- OFN_SHOWHELP flag. Every time the help button is pressed a
- WM_SFXHELP message is sent to the owner of the dialog box.
- wParam is a handle to the dialog box and the HIWORD of lParam
- its template ID, either DLG_OPENSAVE or DLG_EXOPENSAVE.
-
-
- CHOOSE COLOR DIALOG BOX:
-
- - The choose color dialog box comes in two styles: a standard
- choose color dialog box and an 'extended style' choose color
- dialog box.
-
- - An 'Apply' button has been added to both templates. This button
- lets the user update a color to see its effect without
- closing the dialog box. Since the Apply button is not a
- standard feature its automatically handle by SFX200.DLL and
- displayed instead of the Help button. Specifying the
- CC_SHOWHELP flag displays the Help button instead of the Apply
- button. The Apply button is only active when the color dialog
- box is fully open or if the dialog box was created with the
- CC_FULLOPEN flag.
-
- - When the Apply button in a color dialog box is pressed it sends
- a WM_SFXAPPLYCOLOR message to the owner of the dialog box. wParam
- zero and lParam is the selected RGB color value.
-
- - The 'extended style' dialog box only displays the 48 basic colors
- from in the standard color dialog box. This dialog box cannot
-
- be fully opened, however, to activate the 'Apply' button it must
- be created with the CC_FULLOPEN flag. This activates the hidden
- RGB color edit controls that are used to determine the current
- color selection. This selection is passed as the lParam parameter
- of the WM_SFXAPPLYCOLOR message.
-
- - The help button is automatically activated by specifying the
- CC_SHOWHELP flag. Everytime the help button is pressed a
- WM_SFXHELP message is sent to the owner of the dialog box.
- wParam is a handle to the dialog box and the HIWORD of lParam
- its template ID, either DLG_COLOR or DLG_EXCOLOR.
-
-
- CHOOSE FONT DIALOG BOX:
-
- - The font dialog box comes in two styles: a standard font dialog
- box and an 'extended style' font dialog box.
-
- - The 'extended style' font dialog box does not display any
- effects. It is a basic font dialog box that has been redesigned
- to remove the standard half-empty appearance. It supports both the
- CF_APPLY and CF_SHOWHELP styles but only one of these buttons can
- be displayed as they occupy the same space.
-
- - The Apply and Help buttons can be activated by simply
- specifying the appropriate flag: CF_APPLY or CF_SHOWHELP. You
- don't have to worry about any hooks.
-
- - When the Apply button is pressed it sends a WM_SFXAPPLYFONT
- message to the owner of the dialog box. wParam is a handle to
- the newly created font and lParam is the currently selected
- color. You are responsible for deleting this font handle.
-
- - When the help button is pressed a WM_SFXHELP message is sent to
- the dialog's owner. wParam is a handle to the dialog box and the
- HIWORD of lParam its template ID, either DLG_FONT or DLG_EXFONT.
-
-
- PRINT, PRINTSETUP, FIND and REPLACE DIALOG BOXES:
-
- - The help button is automatically activated when you specify the
- appropriate XX_SHOWHELP flag. Every time the help button is
- pressed a WM_SFXHELP message is sent to the dialog's owner. wParam
- is a handle to the dialog box and the HIWORD of lParam its template
- ID, either DLG_PRINT, DLG_PRINTSETUP, DLG_FIND or DLG_REPLACE.
-
-
- PRIVATE MESSAGES:
-
- - The following private messages (defined in SFX200.PAS and
- SFX200.H) can be used with SFX common dialogs:
-
- - WM_SFXAPPLYCOLOR (see Choose Color dialog box)
- - WM_SFXAPPLYFONT (see Choose Font dialog box)
- - WM_SFXHELP
- - WM_SFXINITDIALOG
- - WM_SETBITMAP
-
- WM_SFXHELP:
-
- - This message is sent to the owner of a common dialog box when the
- user presses the help button. wParam is a handle to the dialog box
- and the HIWORD of lParam is its template id.
-
-
- WM_SFXINITDIALOG:
-
- - This message is sent from an SFX common dialog box's WM_INITDIALOG
- message response in SFX200.DLL. wParam is a handle to the common
- dialog box and the HIWORD of lParam is the template ID. This message
- gives you a chance to do some extra initialization before the
- common dialog box is displayed. For example, responding to this
- message is the only way to set the MWS_SFXCAPTION flag for a common
- dialog box and send it a WM_SETBITMAP message.
-
-
- WM_SETBITMAP:
-
- - This message to sent to set the icon you want an MWS_SFXCAPTION
- style common dialog box to display in its title bar. wParam must be a
- valid icon handle. If lParam is zero the icon is shrunk to an
- area 'GetSystemMetrics(SM_CYCAPTION)' in width and
- 'GetSystemMetrics(SM_CYCAPTION) - 4' in height and is
- vertically centered in the title bar. If lParam is a value
- greater than zero (eg 1) the icon is not shrunk. Instead, only
- part of the icon is drawn, starting at the top-left corner, to
- an area 'GetSystemMetrics(SM_CYCAPTION)' in width and
- 'GetSystemMetrics(SM_CYCAPTION) - 4' in height. If you
- use this feature to display an undistorted miniature picture in
- a title bar, only draw in the top-left area of the icon that
- corresponds to the above dimensions.
-
- - If the function GetSystemMetrics(SM_CYSIZE) returns a value of 26
- (ie high screen resolution) the area of the icon displayed on the
- title bar is 28 by 24 pixels. Otherwise (low screen resolution)
- the area is 21 by 17 pixels.
-
- - If you set lParam to a value greater than zero and you want
- your icon image to display correctly you need to supply to two
- icons. One with the image drawn in an area 21 x 17 pixels and
- one drawn in an area 28 x 24 pixels. Then, depending on the value
- returned by GetSystemMetric(SM_CYSIZE) you should load the
- appropriate icon (see Object Viewer source code and resource
- file).
-
-
- USING THE COMMON DIALOG BOX TEMPLATES IN SFX200.DLL:
-
- - To use a common dialog box template in your application
- add the following to your common dialog structure:
-
- 1. Set the structure's hInstance parameter to the value
- returned by the GetSFXInstance function. This value
- is the instance handle of SFX200.DLL.
-
- 2. Set the structure's lpTemplateName parameter to the
- value returned by the GetSFXTemplate function. This
- value is a pointer to a null terminated string
- identifying the common dialog box template to load.
-
- 3. Add the appropriate XX_EnableTemplate flag the structure's
- 'Flags' member (see Object Viewer source code).
-
- - To use a common dialog box template in your ObjectWindows 2.0
- application do the following:
-
- 1. Use the GetSFXTemplateId function to retrieve the resource
- Id of the common dialog box template to load and use it as the
- TemplateId parameter in the common dialog box constructor.
-
- then
-
- 2. Create a module object for SFX200.DLL using the GetSFXInstance
- function and use that module as the TModule parameter in the
- common dialog box constructor (see Object Viewer source code).
-
- - Alternatively, you can use one of the new common dialog box
- functions described in the FUNCTIONS section at the end
- of this file:
-
- - SFXOpenDir
- - SFXOpenFile
- - SFXSaveFile
- - SFXChooseColor
- - SFXChooseFont
-
-
-
- ------------
- 17. WINDOWS.
- ------------
-
- NEW FEATURES:
-
- - Added Chicago-style title bars that display a miniature class
- icon on the title bar, next to the system menu control box, and
- an adjoining left aligned caption. This style is specified using
- the new MWS_SFXCAPTION flag.
-
- - Implemented a new non-client paint function to remove the
- previous window frame flicker.
-
-
- FLAGS:
-
- - The new MWS_SFXCAPTION flag is the old MWS_FLATCLIENT flag. Old
- windows specifying one of the previous MWS_FLATXXX flags will
- automatically display an SFX caption. The MWS_FLATCLIENT style
- has been made the default (so it's no longer needed) and its
- combined styles have been assigned to other flags (for backward
- compatibility).
-
- - As well as the standard window WS_XXX flags, SFX windows use the
- ObjectMate window style flags:
-
- - MWS_SFXCAPTION Chicago-style title bars.
- - MWS_FRAMEDCLIENT 3D raised frame drawn around client area.
- - MWS_RAISEDCLIENT 3D raised border drawn around client area.
- - MWS_GRAY Light gray client area (default)
- - MWS_3DFRAME 3D window frame.
- - MWS_3DGRAY Light gray client area and a 3D
- window frame.
- - MWS_SFXFRAME Special 3D frame.
- - MWS_GLAZE Fills client area with a GLAZE_BRUSH only
- if the class brush is set to zero.
- - MWS_STEEL Fills client area with a STEEL_BRUSH only
- if the class brush is set to zero.
- - MWS_3DGLAZE MWS_GLAZE + MWS_3DFRAME
- - MWS_3DSTEEL MWS_STEEL + MWS_3DFRAME
- - MWS_FRAMED3DFRAME MWS_3DFRAME + MWS_FRAMEDCLIENT
- - MWS_FRAMED3DGLAZE MWS_3DGLAZE + MWS_FRAMEDCLIENT
- - MWS_FRAMED3DSTEEL MWS_3DSTEEL + MWS_FRAMEDCLIENT
- - MWS_RAISED3DFRAME MWS_3DFRAME + MWS_RAISEDCLIENT
- - MWS_RAISED3DGLAZE MWS_3DGLAZE + MWS_RAISEDCLIENT
- - MWS_RAISED3DSTEEL MWS_3DSTEEL + MWS_RAISEDCLIENT
-
- - Old window style flags included for compatibility
-
- - MWS_FLAT3DFRAME Same as MWS_3DFRAME.
- - MWS_FLAT3DGLAZE Same as MWS_3DGLAZE.
- - MWS_FLAT3DSTEEL Same as MWS_3DSTEEL.
-
- - The MWS_SFXFRAME style overrides all other MWS_XXX style flags.
-
- - If the MWS_SFXCAPTION flag is set and the window doesn't
- have its own icon it will display the application's class icon in
- its title bar.
-
-
- WINDOW STYLES:
-
- - The same styles used to create SFX dialogs (see Object Viewer)
- can also be used to create windows, frame windows, MDI windows and
- MDI child windows.
-
-
- DEFAULT WINDOW FUNCTIONS:
-
- - SFX200.DLL defines the following default window functions:
-
- 1. 'SFXDefWindowProc' to handle messages not explicitly
- handled by an SFX window.
-
- 2. 'SFXDefFrameProc' to handle messages not explicitly
- handled by an SFX MDI window.
-
- 3. 'SFXDefMDIChildProc' to handle messages not explicitly
- handled by an SFX MDI child window.
-
- - Like the default dialog function 'SFXDefDlgProc', the most
- important thing these functions do is draw a windows non-client
- area and control its activation/inactivation state.
-
-
- DEFAULT MESSAGES:
-
- - The default window functions must handle the following messages:
-
- WM_COMMAND (not processed by SFXDefMDIChildProc)
- WM_CREATE (not processed by SFXDefMDIChildProc)
- WM_DESTROY
- WM_EXITMENULOOP (defined in SFX200.PAS or SFX200.H)
- WM_ERASEBKGND
- WM_GETMINMAXINFO (not processed by SFXDefMDIChildProc)
- WM_GETTEXT
- WM_LBUTTONDOWN (not processed by SFXDefMDIChildProc)
- WM_MENUSELECT
- WM_NCACTIVATE
- WM_NCCALCSIZE
- WM_NCCREATE (MDI Child only)
- WM_NCLBUTTONDOWN (not processed by SFXDefMDIChildProc)
- WM_NCPAINT
- WM_SETBITMAP (Private message to set caption icon)
- WM_SETTEXT
- WM_SIZE (MDI Child only)
- WM_SYSCHAR (not processed by SFXDefMDIChildProc)
-
- - WM_GETMINMAXINFO is used to limit the maximized window size
- to the width and height of the screen. This looks better with
- 3-dimensional window styles.
-
- - When you subclass a standard combo box you loose control of the
- popup list box and it wont display properly. The WM_COMMAND,
- WM_LBUTTONDOWN and WM_NCLBUTTONDOWN messages supply part
- of the routine used for handling an SFX combo box's popup
- list box correctly. The rest of the routine is written into
- the SFXComboBox class.
-
- - Because these functions draw the window's non-client area they
- also have to draw the window title. The WM_GETTEXT and
- WM_SETTEXT messages are used to set, store and retrieve a
- window's title. If you don't pass the messages on for default
- processing your window title will display garbage (ie %#(&$!)
-
-
- CREATING SFX WINDOWS:
-
- - To create a generic SFX window you must do the following:
-
- 1. Pass the desired WS_XXX and MWS_XXX window style flags in the
- dwStyle parameter of the CreateWindow function.
-
- 2. Call the appropriate default window function: SFXDefWindowProc,
- SFXDefMDIFrameProc or SFXDefMDIChildProc to handle any messages
- not explicitly processed by your application's main window
- function and to handle the messages listed above.
-
- - To create an ObjectWindows 1.0 SFX window you must do the following:
-
- 1. Derive your window class from one of the predefined ObjectWindows
- classes. There are four predefined classes: TSFXWindow, TSFXEditWindow,
- TSFXFileWindow, TSFXMDIWindow (Pascal Only).
-
- - To create an ObjectWindows 2.0 SFX window (C++ 4.0) you must do the
- following:
-
- 1. Derive your frame window from TSFXFrameWindow, TSFXDecoratedFrame,
- TSFXMDIFrame, TSFXDecoratedMDIFrame or TSFXMDIChild.
-
- 2. You can use any client window in a frame window. If you want to
- create a MWS_SFXFRAME style window set the SFXFrame parameter in the
- frame window constructor to TRUE and set your client window's
- background color to light gray. The MWS_SFXFRAME style is not compatible
- with TSFXDecoratedFrame and TSFXDecoratedMDIFrame styles.
-
- PRIVATE MESSAGES:
-
- - You can use the following message (defined in
- SFX200.PAS and SFX200.H) with an SFX Window:
-
- - WM_SETBITMAP
-
-
- WM_SETBITMAP:
-
- - This message to sent to set the icon you want an MWS_SFXCAPTION
- style window to display in its title bar. wParam must be a
- valid icon handle. If lParam is zero the icon is shrunk to an
- area 'GetSystemMetrics(SM_CYCAPTION)' in width and
- 'GetSystemMetrics(SM_CYCAPTION) - 4' in height and is
- vertically centered in the title bar. If lParam is a value
- greater than zero (eg 1) the icon is not shrunk. Instead, only
- part of the icon is drawn, starting at the top-left corner to
- an area 'GetSystemMetrics(SM_CYCAPTION)' in width and
- 'GetSystemMetrics(SM_CYCAPTION) - 4' in height. If you
- use this feature to display an undistorted miniature picture in
- a title bar, only draw in the top-left area of the icon
- corresponding to the above dimensions.
-
- - If the function GetSystemMetrics(SM_CYSIZE) returns a value of 26
- (ie high screen resolution) the area of the icon displayed on the
- title bar is 28 by 24 pixels. Otherwise (low screen resolution)
- the area is 21 by 17 pixels.
-
- - If you set lParam to a value greater than zero and you want
- your icon image to display correctly you need to supply to two
- icons. One with the image drawn in an area 21 x 17 pixels and
- one drawn in an area 28 x 24 pixels. Then, depending on the value
- returned by GetSystemMetric(SM_CYSIZE) you should load the
- appropriate icon (see Object Viewer source code and resource
- file).
-
-
- OBJECTWINDOWS CLASSES:
-
- - Pascal:
-
- TSFXWindow
- TSFXEditWindow
- TSFXFileWindow
- TSFXMDIWindow
-
- - C++ 4.0:
-
- TSFXWindow
- TSFXFrameWindow
- TSFXDecoratedFrame
- TSFXMDIFrame
- TSFXDecoratedMDIFrame
- TSFXMDIChild
-
-
- TSFXWINDOW (Pascal):
-
- - Ancestor class: TWindow
-
- - Constructor: Init(AParent: PWindowsObject; AName: PChar);
-
- - Load: constructs and loads an SFX window from the stream S.
-
- - Store: stores an SFX window on the stream S.
-
- - GetWindowClass: sets the window background brush to zero.
-
-
- TSFXEDITWINDOW (Pascal):
-
- - Ancestor class: TEditWindow
-
- - Constructor: Init(AParent: PWindowsObject; ATitle: PChar);
-
- - Load : constructs and loads an SFX edit window from the
- stream S.
-
- - Store: stores an SFX edit window on the stream S.
-
- - GetWindowClass: sets the window background to a null brush.
-
- - WMCtlColor: sets the edit control color in an MWS_SFXFRAME
- style edit window to light gray.
-
- - WMSize: re aligns the edit control if the edit window
- is resized.
-
- TSFXFILEWINDOW (Pascal):
-
- - Ancestor class: TFileWindow
-
- - Constructor: Init(AParent: PWindowsObject; ATitle, AFileName: PChar);
-
- - Load: constructs and loads an SFX file window from the stream S.
-
- - Store: stores an SFX file window on the stream S.
-
- - GetWindowClass: sets the window background to a null brush.
-
- - WMCtlColor: sets the edit control color in an MWS_SFXFRAME
- style file window to light gray.
-
- - WMSize: re aligns the edit control if the file window
- is resized.
-
-
- TSFXMDIWINDOW (Pascal):
-
- - Ancestor class: TMDIWindow
-
- - Constructor: Init(ATitle: PChar; AMenu: HMenu);
-
- - Load: constructs and loads an SFX MDI window from
- the stream S.
-
- - Store: stores an SFX MDI window on the stream S.
-
- - GetWindowClass: sets the window background brush to zero.
-
- - InitClientWindow: constructs a default TSFX3DMDIClient window.
- You can override this and construct a
- TSFXMDIClient window for MWS_SFXFRAME style
- MDI windows.
-
- - DefWndProc: overrides DefFrameProc, passing all messages
- to SFXDefFrameProc.
-
- TSFXWINDOW (C++ 4.0):
-
- - Ancestor class: TWindow
-
- - Constructors: TSFXWindow(TWindow* parent,
- const char far* title = 0,
- TModule* module = 0);
-
- - GetWindowClass: sets the window background to a null brush.
-
- - DefWindowProc: overrides DefWindowProc, passing all messages to
- SFXDefWindowProc.
-
-
- TSFXFRAMEWINDOW (C++ 4.0):
-
- - Ancestor class: TFrameWindow
-
- - Constructors: TSFXFrameWindow(TWindow* parent,
- const char far* title = 0,
- TWindow* clientWnd = 0,
- BOOL sfxFrame = FALSE,
- BOOL sfxCaption = FALSE,
- BOOL shrinkToClient = FALSE,
- TModule* module = 0);
-
- If sfxFrame is TRUE, the window is created with
- the MWS_SFXFRAME style flag set. If sfxCaption
- is true the MWS_SFXCAPTION flag is set.
-
- - SetupWindow: sets an MWS_SFXFRAME style frame window's client
- window to light gray.
-
- - DefWindowProc: overrides DefWindowProc, passing all messages to
- SFXDefWindowProc.
-
-
- TSFXDECORATEDFRAME (C++ 4.0):
-
- - Ancestor class: TDecoratedFrame
-
- - Constructor TSFXDecoratedFrame(TWindow* parent,
- const char far* title,
- TWindow* clientWnd,
- BOOL sfxCaption = FALSE,
- BOOL trackMenuSelection = FALSE,
- TModule* module = 0);
-
- If sfxCaption is true the MWS_SFXCAPTION flag is set.
-
- - DefWindowProc overrides DefWindowProc, passing all messages to
- SFXDefWindowProc.
-
-
- TSFXMDIFRAME (C++ 4.0):
-
- - Ancestor class: TMDIFrame
-
- - Constructor: TSFXMDIFrame(const char far* title,
- TResId menuResId,
- TMDIClient& clientWnd = *new TSFXMDIClient,
- BOOL sfxFrame = FALSE,
- BOOL sfxCaption = FALSE,
- TModule* module = 0);
-
- If sfxFrame is TRUE, the window is created with the
- MWS_SFXFRAME style flag set. If sfxCaption is true the
- MWS_SFXCAPTION flag is set.
-
- - DefWindowProc: overrides DefWindowProc, passing all messages to
- SFXDefFrameProc.
-
-
- TSFXDECORATEDMDIFRAME (C++ 4.0):
-
- - Ancestor class: TDecoratedMDIFrame
-
- - Constructor: TSFXDecoratedMDIFrame(const char far* title,
- TResId menuResId,
- TMDIClient& clientWnd = *new TMDIClient,
- BOOL sfxCaption = FALSE,
- BOOL trackMenuSelection = FALSE,
- TModule* module = 0);
-
- If sfxCaption is true the MWS_SFXCAPTION flag is set.
-
- - DefWindowProc overrides DefWindowProc, passing all messages to
- SFXDefFrameProc.
-
-
- TSFXMDICHILD (C++ 4.0):
-
- - Ancestor class: TMDIChild
-
- - Constructors: TSFXMDIChild(TMDIClient& parent,
- const char far* title = 0,
- TWindow* clientWnd = new TWindow(0, 0, 0),
- BOOL sfxFrame = FALSE,
- BOOL sfxCaption = FALSE,
- BOOL shrinkToClient = FALSE,
- TModule* module = 0);
-
- If sfxFrame is TRUE, the window is created with the
- MWS_SFXFRAME style flag set. If sfxCaption is true the
- MWS_SFXCAPTION flag is set.
-
- - SetupWindow: sets an MWS_SFXFRAME style frame window's client
- window to light gray.
-
- - DefWindowProc: overrides DefWindowProc, passing all messages to
- SFXDefMDIChildProc.
-
-
-
- --------------
- 18. 3D MENUS.
- --------------
-
- - Stylish 3D ownerdraw menus have been added to ObjectMate 2.6 and
- they're easy to use.
-
- - The WINMENU demonstration shows you how easy it is to add 3D
- menus to your application, the supplied source code does all
- the work. Just use the functions in the Pascal ODMENU unit or
- the C++ SMENU.H and SMENU.CPP files. The supplied 3D menu
- functions let you specify the menu text font, highlight
- background color and highlight text color, or you can use the
- default font and system colors. If you want to add bitmaps or
- icons to the menu (eg like Chicago does) you will need to
- modify the source code.
-
- - To add basic 3D ownerdraw menus to your application you will need
- to do following:
-
- 1. Create a new popup menu and append ownerdraw items to it
- or modify each item in an existing menu resource.
-
- 2. Process the WM_MEASUREITEM, WM_DRAWITEM and WM_MENUCHAR
- messages. WM_MEASUREITEM and WM_DRAWITEM simply call the
- supplied MeasureMenuItem and DrawMenuItem functions.
-
- 3. With ownerdraw menus you must create the menu mnenonics
- yourself. This is done in response to the WM_MENUCHAR
- message.
-
- 4. Since a window's system menu is seldom modified, two
- functions are supplied that set up a basic 3D ownerdraw
- system menu. Set3DSystemMenu automatically modifies the
- system menu items to MF_OWNERDRAW and ProcessSystemChar
- handles the menu item mnenonics.
-
- - The most time consuming thing you'll have to do is append/modify
- each menu item to MF_OWNERDRAW and handle its mnenonics.
-
- - One quirk is the colored flash that occurs when a menu is
- first drawn. The menu background color is always the color
- specified by the system color utility in Control Panel. An
- ownerdraw menu first draws a blank menu background using the
- system color and then draws each menu item. There is no way to
- prevent this. Usually menus are white so you'll see a
- white flash. If the menu is light gray you wont see any flash.
-
-
-
- -----------------------------------
- 19. MESSAGE BOXES and INPUT BOXES.
- -----------------------------------
-
- - The system menu has been removed from the message boxes and
- input boxes, to make them look better.
-
- - You can give a message box or input box an SFXCaption by
- combining the MWS_SFXCAPTION flag with the MWS_XXX style flag
- specified in the style argument of the SFXMsgBox or SFXInputBox
- functions.
-
-
-
- --------------
- 20. FUNCTIONS.
- --------------
-
- FUNCTIONS THAT HAVE CHANGED:
-
- - The following functions have had there arguments changed
-
- 1. DrawBorder.
-
- 2. Draw3DBorder.
-
- 3. SFXDefFrameProc.
-
-
- NEW FUNCTIONS:
-
- - Nine new functions have been added to the library.
-
- 1. IsNCActive
- 2. PtInClient
- 3. PtInWindow
- 4. SFXDirBox
- 5. SFXOpenDir
- 6. SFXOpenFile
- 7. SFXSaveFile
- 8. SFXChooseColor
- 9. SFXChooseFont
-
-
- FUNCTION LIST:
-
- Common dialog box functions
-
- - SFXDirBox
- - SFXOpenDir
- - SFXOpenFile
- - SFXSaveFile
- - SFXChooseColor
- - SFXChooseFont
-
- Drawing functions:
-
- - AlignBrush
- - BlackFrame
- - ChildToParentRect
- - DrawBorder
- - Draw3DBorder
- - EraseObject
- - GetSFXCtrlFont
- - GetSFXObject
-
- Information functions
-
- - GetSFXInstance
- - GetSFXTemplate
- - GetSFXTempateId
- - GetSFXVersion
- - IsNCActive
- - PtInClient
- - PtInWindow
-
- Window creation functions
-
- - SFXDefDlgProc
- - SFXDefWindowProc
- - SFXDefFrameProc
- - SFXDefMDIChildProc
- - SFXMsgBox
- - SFXInputBox
-
- Window display functions
-
- - CenterWindow
-
-
- SFXDIRBOX:
-
- - The SFXDirBox function displays a "open file" style
- common dialog box that lists only directories. When the OK
- button is pressed by the user, the current directory selection
- is copied into the supplied buffer.
-
- - Syntax:
-
- int SFXDirBox(HWND hWndParent, const char far* caption, char far* dir,
- UINT flags = 0, UINT style = 0)
-
- function SFXDirBox(WndParent: HWnd; Caption, Dir: PChar;
- Flags, Style: Word): Integer;
-
-
- Parameter Description
- -----------------------------------------------------------
- hWndParent Identifies the window that owns the
- directory dialog box.
-
- caption Points to a null terminated character string
- that is to be used for the dialog's caption.
- The default is 'Directories'.
-
- dir Points to a buffer that is to receive
- the path of the selected directory.
-
- flags Specifies the OFN flags to add to the
- Flags member of the OFN structure. By
- default, the selected directory becomes the
- current directory. Specifying OFN_NOCHANGEDIR
- resets the current directory to what it was
- before the dialog box was created. This is
- useful if you only want to retrieve a directory
- path from the user without changing directories.
- Specifying OFN_SHOWHELP displays the Help
- button. When this button is pressed a WM_SFXHELP
- message is sent to the owner of the dialog box.
- Its lParam value identifies the directory dialog
- box (ie DLG_OPENDIR). In C++ you will need
- to cast the flags (a DWORD) to an UINT.
-
- style Specifies the directory box window style. wStyle
- can be one of the following values:
-
- Value Description
- -------------------------------------------
- MWS_SFXFRAME SFXFrame with light gray client area
- MWS_3DGRAY 3DFrame with raised light gray client area
- MWS_3DGLAZE 3DFrame with raised glaze client area
- MWS_3DSTEEL 3DFrame with raised steel client area
-
- - If the user presses the OK button the return value is IDOK.
- Otherwise it's IDCANCEL.
-
- - This function first appeared in the beta version of ObjectMate
- 2.6 and is only included here for backward compatibility. It is
- superseded by the new SFXOpenDir function.
-
-
- SFXOPENDIR:
-
- - The new SFXOpenDir function displays a "open file" style
- directory selection common dialog box. When the OK button
- is pressed by the user, the current directory selection
- is copied into the supplied buffer. This function is
- intended to replace SFXDirBox.
-
- - Syntax:
-
- BOOL SFXOpenDir(HWND hWndParent, char far* dir, const char far* title = "",
- DWORD flags = 0, int templateId = 0, BOOL center = FALSE);
-
-
- function SFXOpenDir (WndParent: HWnd; Buffer, Title: PChar; OFNFlags: LongInt;
- Template: Integer; Center: Boolean): BOOL;
-
-
- Parameter Description
- -----------------------------------------------------------
- hWndParent Identifies the window that owns the
- directory dialog box.
-
- dir Points to a buffer that is to receive
- the path of the selected directory.
-
- title Points to a null terminated character string
- that is to be used as the dialog's title.
- If title is null the default title "Directories"
- is used.
-
- flags Specifies the OFN flags to add to the
- Flags member of the OFN structure. By
- default, the selected directory becomes the
- current directory. Specifying OFN_NOCHANGEDIR
- resets the current directory to what it was
- before the dialog box was created. This is
- useful if you only want to retrieve a directory
- path from the user without changing directories.
- Specifying OFN_SHOWHELP displays the Help
- button. When this button is pressed a WM_SFXHELP
- message is sent to the owner of the dialog box.
- Its lParam value identifies the directory dialog
- box (ie DLG_OPENDIR). This member can be null.
-
- templateId Identifies which common dialog box template to
- load. This value can be obtained using the
- GetSFXTemplateId function. If templateId is null
- the default "SFX3DDlg" DLG_OPENDIR template is used.
-
- center Specifies whether to center the dialog box over
- the desktop window. If center is TRUE the dialog
- box is centered. If it's FALSE it's not.
-
- - The default flags set internally by this function are
- OFN_PATHMUSTEXIST, OFN_ENABLETEMPLATE and OFN_ENABLEHOOK. This
- function returns TRUE if successful. Otherwise, it returns
- FALSE.
-
-
- SFXOPENFILE:
-
- - The new SFXOpenFile function displays an "Open File" common
- dialog box. When the OK button is pressed by the user, the
- path of the selected file is copied into the supplied buffer.
-
- - Syntax:
-
- BOOL SFXOpenFile(HWND hwndParent, char far* file, const char far* filters,
- DWORD flags = 0, int templateId = 0, BOOL center = FALSE,
- const char far* title = "", DWORD far* filterIndex = 0,
- const char far* defExt = "");
-
- function SFXOpenFile (WndParent: HWnd; Buffer, Filters: PChar; OFNFlags: LongInt;
- Template: Integer; Center: Boolean; Title: PChar;
- var FilterIndex: LongInt; DefExt: PChar): BOOL;
-
-
- Parameter Description
- -----------------------------------------------------------
- hWndParent Identifies the window that owns the
- 'Open File' dialog box.
-
- file Points to a buffer that is to receive
- the path of the selected file.
-
- filters Points to a null terminated character string
- that specifies the filters to display in the
- dialog box. If filters is null, the default
- "All Files" and "*.*" are used.
-
- flags Specifies the OFN flags to add to the
- OFN_ENABLETEMPLATE and OFN_ENABLEHOOK flags
- set internally by this function. If flags
- is null the default OFN_FILEMUSTEXIST and
- OFN_HIDEREADONLY flags are added.
-
- templateId Identifies which common dialog box template to
- load. This value can be obtained using the
- GetSFXTemplateId function. If templateId is null
- the default "SFX3DDlg" DLG_OPENSAVE template is used.
-
- center Specifies whether to center the dialog box over
- the desktop window. If center is TRUE the dialog
- box is centered. If it's FALSE it's not.
-
- title Points to a null terminated character string
- that is to be used as the dialog's title.
- If title is null the default title "Open File"
- is used.
-
- filterIndex Specifies which filter to use when initially
- displaying file names. If filterIndex is
- null the first filter (1) in the filter
- string is used.
-
- defExt Stores the default file extension. If
- defExt is null there is no default file
- extension.
-
- - When SFXOpenFile returns the filterIndex argument contains the
- index of the selected filter string (eg 1, 2, 3 etc.). This
- function returns TRUE if successful. Otherwise. it returns
- FALSE.
-
-
- SFXSAVEFILE:
-
- - The new SFXSaveFile function displays an "Save File As" common
- dialog box. When the OK button is pressed by the user, the
- selected path is copied into the supplied buffer.
-
- - Syntax:
-
- BOOL SFXSaveFile(HWND hwndParent, char far* file, const char far* filters,
- DWORD flags = 0, int templateId = 0, BOOL center = FALSE,
- const char far* title = "", DWORD far* filterIndex = 0,
- const char far* defExt = "");
-
- function SFXSaveFile (WndParent: HWnd; Buffer, Filters: PChar; OFNFlags: LongInt;
- Template: Integer; Center: Boolean; Title: PChar;
- var FilterIndex: LongInt; DefExt: PChar): BOOL;
-
-
- Parameter Description
- -----------------------------------------------------------
- hWndParent Identifies the window that owns the
- 'Save File As' dialog box.
-
- file Points to a buffer that is to receive
- the path of the selected file.
-
- filters Points to a null terminated character string
- that specifies the filters to display in the
- dialog box. If filters is null, the default
- "All Files" and "*.*" are used.
-
- flags Specifies the OFN flags to add to the
- OFN_ENABLETEMPLATE and OFN_ENABLEHOOK flags
- set internally by this function. If flags
- is null the default OFN_FILEMUSTEXIST and
- OFN_HIDEREADONLY flags are added.
-
- templateId Identifies which common dialog box template to
- load. This value can be obtained using the
- GetSFXTemplateId function. If templateId is null
- the default "SFX3DDlg" DLG_OPENSAVE template
- is used.
-
- center Specifies whether to center the dialog box over
- the desktop window. If center is TRUE the dialog
- box is centered. If it's FALSE it's not.
-
- title Points to a null terminated character string
- that is to be used as the dialog's title.
- If title is null the default title "Save
- File As" is used.
-
- filterIndex Specifies which filter to use when initially
- displaying file names. If filterIndex is
- null the first filter (1) in the filter
- string is used.
-
- defExt Stores the default file extension. If
- defExt is null there is no default file
- extension.
-
- - When SFXSaveFile returns the filterIndex argument contains the
- index of the selected filter string (eg 1, 2, 3 etc.). This
- function returns TRUE if successful. Otherwise. it returns
- FALSE.
-
-
- SFXCHOOSECOLOR:
-
- - The new SFXChooseColor function displays a "Choose Color" common
- dialog box. When the OK button is pressed by the user, the
- 'rgbColor' argument contains the RGB value of the selected color.
-
- - Syntax:
-
- BOOL SFXChooseColor(HWND hwndParent, COLORREF far* rgbColor,
- DWORD flags = 0, int templateId = 0,
- BOOL center = FALSE, COLORREF far* customColors = 0);
-
- function SFXChooseColor(WndParent: HWnd; var RGBColor: LongInt;
- CCFlags: LongInt; Template: Integer;
- Center: Boolean; CustomColors: PLongInt): BOOL;
-
-
- Parameter Description
- -----------------------------------------------------------
- hWndParent Identifies the window that owns the
- 'Choose Color' dialog box.
-
- rgbColor Specifies the color initially selected when
- the dialog box is created and it contains the
- users color selection when the dialog box is
- closed.
-
- flags Specifies the CHOOSECOLOR flags to add to the
- CC_ENABLETEMPLATE and CC_ENABLEHOOK flags
- set internally by this function. If flags
- is null the default CC_RGBINIT flag is added.
-
- templateId Identifies which common dialog box template to
- load. This value can be obtained using the
- GetSFXTemplateId function. If templateId is null
- the default "SFX3DDlg" DLG_COLOR template
- is used.
-
- center Specifies whether to center the dialog box over
- the desktop window. If center is TRUE the dialog
- box is centered. If it's FALSE it's not.
-
- customColors Points to an array of 16 DWORDs (LongInts)
- that contain RGB values for the custom color boxes
- in the dialog box. If the user modifies these colors
- the system updates the array with the new RGB values.
- If this value is null, the default array containing
- 16 shades of grey is used.
-
- - When this function returns 'rgbColor' contains the user's selected color
- and 'customColors' points to the updated color array.
-
-
- SFXCHOSEFONT:
-
- - The new SFXChooseFont function displays a "Choose Font" common
- dialog box. When the OK button is pressed by the user, the
- supplied LOGFONT structure is updated.
-
- - Syntax:
-
- BOOL SFXChooseFont(HWND hwndParent, LOGFONT far* logFont,
- DWORD flags = 0, int templateId = 0,
- BOOL center = FALSE, COLORREF far* rgbColor = 0);
-
- function SFXChooseFont(WndParent: HWnd; var LogFont: TLogFont;
- CFFlags: LongInt; Template: Integer;
- Center: Boolean; var RGBColor: LongInt): BOOL;
-
-
- Parameter Description
- -----------------------------------------------------------
- hWndParent Identifies the window that owns the
- 'Choose Font' dialog box.
-
- logFont Points to a logFont structure that specifies
- the font used to initialze dialog box. When the
- user closes the dialog box the system updates the
- logFont structure.
-
- flags Specifies the CHOOSEFONT flags to add to the
- CF_INITTOLOGFONTSTRUCT, CF_ENABLETEMPLATE and
- CF_ENABLEHOOK flags set internally by this function.
- If flags is null the default CF_SCREENFONTS flag is
- added.
-
- templateId Identifies which common dialog box template to
- load. This value can be obtained using the
- GetSFXTemplateId function. If templateId is null
- the default "SFX3DDlg" DLG_EXFONT template is used.
-
- center Specifies whether to center the dialog box over
- the desktop window. If center is TRUE the dialog
- box is centered. If it's FALSE it's not.
-
- rgbColor Specifies the initial RGB color value that
- should be used to set the text color. When
- the dialog box is closed this value contains
- the color of the font selected by the user.
-
- - When this function returns 'rgbColor' contains the color of
- the font selected by the user and the logFont structure
- contains the updated LOGFONT data.
-
-
- ALIGNBRUSH:
-
- - Syntax:
-
- void AlignBrush(HWND hWnd, HDC hDC, HBRUSH hBrush)
-
- procedure AlignBrush(Wnd: HWnd; DC: HDC; Brush: HBrush) ;
-
-
- Parameter Description
- -----------------------------------------------------------
- hWnd Handle of window to align brush with origin.
-
- hDC Device context to set new origin.
-
- hBrush Brush to align.
-
- - AlignBrush calls UnrealizeObject and SetBrushOrg to
- align the origin of hBrush in hDC to the origin of hWnd.
-
-
- BLACKFRAME:
-
- - Syntax:
-
- void BlackFrame(HDC hDC, int X1, int Y1, int X2, int Y2)
-
- procedure BlackFrame(DC: HDC; X1, Y1, X2, Y2: Integer) ;
-
-
- Parameter Description
- -----------------------------------------------------------
- hDC Identifies the device context.
-
- X1 Specifies the logical x-coordinate of the upper
- left corner of the frame.
-
- Y1 Specifies the logical y-coordinate of the upper
- left corner of the frame.
-
- X2 Specifies the logical x-coordinate of the lower
- right corner of the frame.
-
- Y2 Specifies the logical y-coordinate of the lower
- right corner of the frame.
-
- - BlackFrame draws a black frame (one pixel in width) around the
- rectangle specified by X1, Y1, X2 and Y2. The top-right and
- bottom-right pixels are dark gray to prevent pointing.
-
-
- CHILDTOPARENTRECT:
-
- - Syntax
-
- RECT far* ChildToParentRect(HWND hWnd)
-
- function ChildToParentRect(Wnd: HWnd): PRect ;
-
-
- Parameter Description
- -----------------------------------------------------------
- hWnd Handle of child window.
-
- - ChildToParentRect returns a pointer to a RECT data structure
- that contains the dimensions of hWnd in parent client
- coordinates.
-
-
- DRAWBORDER and DRAW3DBORDER:
-
- - The first argument in these two functions previously specified
- a window handle. This has been been changed to a display
- context. The actual function in SFX200.DLL accepts either a valid
- window handle or display context so it's backwardly compatible.
- However, the new function declaration in SFX200.PAS and SFX200.H
- specifies a display context.
-
- - Syntax
-
- void DrawBorder(HDC hDC, int x, int y, int width, int height,
- UINT style = BD_RECESSED)
-
- void Draw3DBorder(HDC hDC, int x, int y, int width, int height,
- UINT style = BD_RECESSED)
-
- procedure DrawBorder(DC: HDC; X, Y, W, H: Integer; Style: Word);
-
- procedure Draw3DBorder(DC: HDC; X, Y, W, H: Integer; Style: Word);
-
-
- Parameter Description
- -----------------------------------------------------------
- hDC Identifies the display context.
-
- x Specifies the logical x coordinate of the top
- left corner of the rectangular border.
-
- y Specifies the logical y coordinate of the top
- left corner of the rectangular border.
-
- width Specifies the width of the rectangular border.
-
- height Specifies the height of the rectangular border.
-
- style Specifies the border style. It can be BD_RECESSED or
- BD_RAISED.
-
- - DrawBorder draws a Borland style 3-dimensional border (one pixel
- in width) around the rectangle specified by X, Y, W and H. This
- border can be recessed (BD_RECESSED) or raised (BD_RAISED).
-
- - Draw3DBorder draws a 3-dimensional border (three pixels in width)
- around the rectangle specified by X, Y, W and H. This border
- can either be recessed (BD_RECESSED) or raised (BD_RAISED).
-
-
- ERASEOBJECT:
-
- - Syntax
-
- BOOL EraseObject(HGDIOBJ hObject)
-
- function EraseObject(Handle: THandle): BOOL;
-
-
- Parameter Description
- -----------------------------------------------------------
- hObject Identifies a handle to a logical pen, brush, font,
- bitmap, region or palette.
-
- - EraseObject is a safe way to delete a resource object
- from memory. It checks to make sure the handle identified by
- hObejct is valid before calling DeleteObject. The return
- value is TRUE if hObject is erased. Otherwise, it is FALSE.
-
-
- GETSFXCTRLFONT:
-
- - Syntax
-
- HFONT GetSFXCtrlFont(HWND hWnd)
-
- function GetSFXCtrlFont(Wnd: HWnd): HFont;
-
-
- Parameter Description
- -----------------------------------------------------------
- hWnd Identifies the control's parent window.
-
- - GetSFXCtrlFont retrieves the LOGFONT data for current dialog
- box bold font. It sets the lfWeight member to FW_NORMAL and
- creates a new font. The return value is a handle to the
- newly created font. If hWnd is NULL the bold system font is
- retrieved and used to create a fine system font. You are
- responsible for deleting this font.
-
- - SFX controls use this function to create the MBS_DEFFONT,
- MSH_DEFFONT and MSS_DEFFONT styles which are set by
- the fine font check box in the Resource Workshop SFX button,
- checkbox, radiobutton, static and shade style dialog boxes.
-
-
- GETSFXOBJECT:
-
- - Syntax
-
- HGDIOBJ GetSFXObject(int index)
-
- function GetSFXObject(Index: Integer): THandle;
-
-
- Parameter Description
- -----------------------------------------------------------
- index Specifies the type of SFX stock object desired.
- index must be one of the following values:
-
- Value Meaning
- -------------------------------------------
- GLAZE_BRUSH Glaze brush
- STEEL_BRUSH Chiselled steel brush
- RED_BRUSH Red brush
- LIME_BRUSH lime brush
- YELLOW_BRUSH yellow brush
- BLUE_BRUSH Blue brush
- MAGENTA_BRUSH Magenta brush
- MAROON_BRUSH Maroon brush
- GREEN_BRUSH Green breen
- NAVY_BRUSH Navy brush
- PURPLE_BRUSH Purple brush
- FINE_FONT Regular MS Sans Serif 8 font
- BOLD_FONT Bold MS Sans Serif 8 font
- RED_PEN Red pen
- BLUE_PEN Blue pen
- GREEN_PEN Green pen
- MAROON_PEN Maroon pen
- NAVY_PEN Navy pen
- PURPLE_PEN Purple pen
- SYSTEM_FINE_FONT Regular system font, ie not Bold
-
- - The return value is the handle of the desired stock object.
- Otherwise, it is NULL.
-
- - The SFX stock objects are used internally by
- SFX200.DLL to draw its custom controls, dialogs and windows. Do
- not delete the handle returned by this function.
-
-
- GETSFXINSTANCE:
-
- - Syntax
-
- HINSTANCE GetSFXInstance()
-
- function GetSFXInstance: THandle;
-
- - No parameters.
-
- - GetSFXInstance returns the instance handle of SFX200.DLL.
- This handle can be used as the hInstance parameter in a common
- dialog structure loading a custom template from SFX200.DLL.
-
-
- GETSFXTEMPLATE:
-
- - Syntax:
-
- char far* GetSFXTemplate(char far* className, UINT templateType)
-
- function GetSFXTemplate(Class: PChar; Template: Word): PChar;
-
-
- Parameter Description
- -----------------------------------------------------------
- className Identifies the SFX dialog class. It must be
- one of the following classes: SFX3DDlg,
- SFXGlazeDlg, SFXGrayDlg or SFXSteelDlg.
-
- templateType Identifies the common dialog box template.
- templateType must be one of the template ID's:
-
- Value Description
- -------------------------------------------
- DLG_COLOR Choose color dialog box
- DLG_EXCOLOR Customised choose color dialog box
- DLG_OPENSAVE Open/save dialog box
- DLG_EXOPENSAVE Open/save with extended select
- DLG_PRINT Print dialog box
- DLG_PRINTSETUP Print setup dialog box
- DLG_FIND Find dialog box
- DLG_REPLACE Replace dialog box
- DLG_FONT Font dialog box
- DLG_EXFONT Customised font dialog box
-
- - GetSFXTemplate returns a pointer to a null terminated string
- that identifies the common dialog box template to load. The
- pointer should be used as the lpTemplateName member in your
- common dialog structure.
-
-
- GETSFXTEMPLATEID:
-
- - Syntax:
-
- int GetSFXTemplateId(char far* className, UINT templateType)
-
- function GetSFXTemplate(Class: PChar; Template: Word): Integer;
-
-
- Parameter Description
- -----------------------------------------------------------
- className Identifies the SFX dialog class. It must be
- one of the following classes: SFX3DDlg,
- SFXGlazeDlg, SFXGrayDlg or SFXSteelDlg.
-
- templateType Identifies the common dialog box template.
- templateType must be one of the template ID's:
-
- Value Description
- -------------------------------------------
- DLG_COLOR Choose color dialog box
- DLG_EXCOLOR Customised choose color dialog box
- DLG_OPENSAVE Open/save dialog box
- DLG_EXOPENSAVE Open/save with extended select
- DLG_PRINT Print dialog box
- DLG_PRINTSETUP Print setup dialog box
- DLG_FIND Find dialog box
- DLG_REPLACE Replace dialog box
- DLG_FONT Font dialog box
- DLG_EXFONT Customised font dialog box
-
- - GetSFXTemplateId returns the resource Id that identifies the
- common dialog box template to load. This value should be used
- as the templateId parameter in your ObjectWindows 2.0 common
- dialog box constructor or one of the new common dialog
- box functions.
-
-
- GETSFXVERSION:
-
- - Syntax
-
- UINT GetSFXVersion ()
-
- function GetSFXVersion: Word;
-
- - No parameters.
-
- - The return value 'SFXVERSION' specifies the version number of SFX200.DLL.
- The current value of SFXVERSION is 0x0250 ($0250) for
- version 2.6.
-
-
- ISNCACTIVE:
-
- - Since the new default window/dialog functions draw the
- non-client area and control window/dialog activation/inactivation they
- need to keep track of a window's activation state. IsNCActive
- returns the activation state of the caption not the window.
-
- - Syntax:
-
- BOOL IsNCActive(HWND hWnd)
-
- function IsNCActive(Wnd: HWnd): BOOL;
-
-
- Parameter Description
- -----------------------------------------------------------
- hWnd Identifies the SFX window whose activation
- state is to be checked.
-
- - If the caption is active IsNCActive returns TRUE. Otherwise it
- returns FALSE.
-
-
- PTINCLIENT and PTINWINDOW:
-
- - Syntax
-
- BOOL PtInClient(HWND hWnd, POINT point)
-
- BOOL PtInWindow(HWND hWnd, POINT point)
-
- function PtInClient(Wnd: HWnd; Point: TPoint): BOOL;
-
- function PtInWindow(Wnd: HWnd; Point: TPoint): BOOL;
-
-
- Parameter Description
- -----------------------------------------------------------
- hWnd Handle of the window to be checked.
-
- point Specifies a POINT structure that contains
- the specified point.
-
- - If the point lies within the client area of the window,
- PtInClient returns TRUE. If the point lies anywhere within the
- window, PtInWindow returns TRUE. Otherwise both functions
- return FALSE.
-
-
- SFXDEFDLGPROC:
-
- - Syntax
-
- LRESULT SFXDefDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-
- function SFXDefDlgProc(Dlg: HWnd; Msg, wParam: Word; lParam: LongInt): LongInt;
-
-
- Parameter Description
- -----------------------------------------------------------
- hDlg Handle of the dialog box.
-
- msg Specifies the message number.
-
- wParam Specifies 16 bits of additional message-dependent information.
-
- lParam Specifies 32 bits of additional message-dependent information.
-
- - This function provides default processing for any Windows
- messages that an SFX dialog box does not process. All
- messages not explicitly processed by the Window function must
- be passed to the SFXDefDlgProc function not the DefDlgProc
- function.
-
- - The return value specifies the result of the message
- processing and depends on the actual message sent.
-
- - The SFXDefDlgProc function must process the following messages:
-
- WM_CREATE
- WM_COMMAND
- WM_CTLCOLOR
- WM_DESTROY
- WM_ERASEBKGND
- WM_GETMINMAXINFO
- WM_GETTEXT
- WM_INITDIALOG
- WM_LBUTTONDOWN
- WM_NCLBUTTONDOWN
- WM_NCCALCSIZE
- WM_NCPAINT
- WM_SETBITMAP
- WM_SETBRUSH
- WM_SETTEXT
-
- - A generic Windows program should pass these messages onto
- SXDefDlgProc. An ObjectWindows 1.0 program should call
- DefWndProc. An ObjectWindows 2.0 program should call
- DefaultProcessing.
-
-
- SFXDEFWINDOWPROC:
-
- - Syntax
-
- LRESULT SFXDefWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-
- function SFXDefWindowProc(Wnd: HWnd; Msg, wParam: Word; lParam: LongInt): LongInt;
-
-
- Parameter Description
- -----------------------------------------------------------
- hWnd Handle of the window.
-
- msg Specifies the message number.
-
- wParam Specifies 16 bits of additional message-dependent information.
-
- lParam Specifies 32 bits of additional message-dependent information.
-
- - This function provides default processing for any Windows
- messages that an SFX window does not process. All messages
- not explicitly processed by the Window function must be passed
- to the SFXDefWindowProc function not the DefWindowProc function.
-
- - The return value specifies the result of the message
- processing and depends on the actual message sent.
-
- - The SFXDefWindowProc function must process the following messages:
-
- WM_COMMAND
- WM_CREATE
- WM_DESTROY
- WM_EXITMENULOOP (defined in SFX200.PAS or SFX200.H)
- WM_ERASEBKGND
- WM_GETMINMAXINFO
- WM_GETTEXT
- WM_LBUTTONDOWN
- WM_MENUSELECT
- WM_NCACTIVATE
- WM_NCCALCSIZE
- WM_NCLBUTTONDOWN
- WM_NCPAINT
- WM_SETBITMAP
- WM_SETTEXT
- WM_SYSCHAR
-
- - A Generic Windows program should pass these messages onto
- SFXDefWindowProc. An ObjectWindows 1.0 program should call
- DefWndProc. An ObjectWindows 2.0 program should call
- DefaultProcessing. #$ K + #$ K + SFXDefMDIChildProc
-
-
- SFXDEFFRAMEPROC:
-
- - Syntax
-
- LRESULT SFXDefFrameProc(HWND hWnd, HWND hWndClient, UINT msg,
- WPARAM wParam, LPARAM lParam)
-
- function SFXDefFrameProc(Wnd, ClientWnd: HWnd; Msg, wParam: Word;
- lParam: LongInt): LongInt;
-
-
- Parameter Description
- -----------------------------------------------------------
- hWnd Handle of the frame window.
-
- hWndClient Handle of the client window.
-
- msg Specifies the message number.
-
- wParam Specifies 16 bits of additional message-dependent information.
-
- lParam Specifies 32 bits of additional message-dependent information.
-
- - This function provides default processing for any Windows
- messages that an SFX multiple document interface (MDI)
- frame window does not process. All messages not explicitly
- processed by the Window function must be passed to the
- SFXDefFrameProc function not the DefFrameProc function.
-
- - The return value specifies the result of the message
- processing and depends on the actual message sent.
-
- - The SFXDefFrameProc function must process the following messages:
-
- WM_COMMAND
- WM_CREATE
- WM_DESTROY
- WM_EXITMENULOOP (defined in SFX200.PAS or SFX200.H)
- WM_ERASEBKGND
- WM_GETMINMAXINFO
- WM_GETTEXT
- WM_MENUSELECT
- WM_NCACTIVATE
- WM_NCCALCSIZE
- WM_NCLBUTTONDOWN
- WM_NCPAINT
- WM_SETBITMAP
- WM_SETTEXT
- WM_SYSCHAR
-
- - A Generic Windows program should pass these messages onto
- SFXDefFrameProc. An ObjectWindows 1.0 program should call
- DefWndProc. An ObjectWindows 2.0 program should call
- DefaultProcessing.
-
-
- SFXDEFMDICHILDPROC:
-
- - Syntax
-
- LRESULT SFXDefMDIChildProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-
- function SFXDefMDIChildProc(Wnd: HWnd; Msg, wParam: Word; lParam: LongInt): LongInt;
-
-
- Parameter Description
- -----------------------------------------------------------
- hWnd Handle of the MDI child window.
-
- msg Specifies the message number.
-
- wParam Specifies 16 bits of additional message-dependent information.
-
- lParam Specifies 32 bits of additional message-dependent information.
-
- - This function provides default processing for any Windows
- messages that an SFX MDI child window does not process.
- All messages not explicitly processed by the Window function
- must be passed to the SFXDefMDIChildProc function not the
- DefMDIChildProc function.
-
- - The return value specifies the result of the message
- processing and depends on the actual message sent.
-
- - The SFXDefMDIChildProc function must process the following messages:
-
- WM_DESTROY
- WM_ERASEBKGND
- WM_GETTEXT
- WM_MENUSELECT
- WM_NCACTIVATE
- WM_NCCALCSIZE
- WM_NCCREATE
- WM_NCPAINT
- WM_SIZE
- WM_SETBITMAP
- WM_SETTEXT
-
- - A generic Windows program should pass these messages onto
- SFXDefMDIChildProc. An ObjectWindows 1.0 program should call
- DefWndProc. An ObjectWindows 2.0 program should call
- DefaultProcessing.
-
-
- SFXMSGBOX:
-
- - The SFXMsgBox function creates and displays an SFX message box
- that contains an application supplied message and caption, plus
- any combination of predefined icons and push buttons. The
- maximum number of characters you can display in a message box
- is about 220, depending on the word combination.
-
- - The SFXMsgBox function is call-compatible with the Windows API
- MessageBox function except for one extra parameter: style.
- 'style' is a word value specifying the window style. If
- style is zero the default style is used: MWS_SFXFRAME.
-
- - Syntax
-
- int SFXMsgBox(HWND hWndParent, const char far* text, const char far*
- caption, UINT type = 0, UINT style = 0)
-
- function SFXMsgBox(WndParent: HWnd; Txt, Caption: PChar; TextType,
- Style: Word): Integer;
-
- Parameter Description
- -----------------------------------------------------------
- hWndParent Identifies the window that owns the message box.
- This can be NULL.
-
- text Points to a null-terminated string that contains
- the message to be displayed.
-
- caption Points to a null-terminated character string to
- be used for the window caption.
-
- type Specifies the contents of the message box. type
- can be any combination of values defined by the
- Windows API MessageBox function plus any of the
- following:
-
- Value Description
- -------------------------------------------
- MB_GO Go button
- MB_GOSTOP Go and Stop buttons
- MB_OKCANCELHELP OK, Cancel and Help buttons
- MB_YESNOHELP Yes, No and Help buttons
-
- style Specifies the message box style. style can be one
- of the following values:
-
- Value Description
- -------------------------------------------
- MWS_SFXFRAME SFXFrame with light gray client
- area
- MWS_GRAY Modal frame with raised light
- gray client area
- MWS_GLAZE Modal frame with raised glaze
- client area
- MWS_STEEL Modal frame with raised steel
- client area
- MWS_3DGRAY 3DFrame with raised light gray
- client area
- MWS_3DGLAZE 3DFrame with raised glaze client
- area
- MWS_3DSTEEL 3DFrame with raised steel client
- area
-
- - The return value specifies the outcome of the function. It
- is zero if there is not enough memory to create the message
- box. Otherwise, it is one of the following values:
-
- Return Value Description
- -----------------------------------------------------------
- IDOK OK button pressed
- IDCANCEL Cancel button pressed
- IDABORT Abort button pressed
- IDRETRY Retry button pressed
- IDIGNORE Ignore button pressed
- IDYES Yes button pressed
- IDNO No button pressed
- IDGO Go button pressed
- IDSTOP Stop button pressed
-
- - The MB_OKCANCELHELP and MB_YESNOHELP flags create a message
- box that contains a help button. When the user selects the help
- button a WM_COMMAND message is sent to the message box's parent
- window. wParam contains the help button ID: IDHELP,
- LOWORD(lParam) contains the handle of the static control
- displaying the message text and HIWORD(lParam) contains the
- BN_CLICKED notification code. Usually, LOWORD(lParam) contains
- the window handle of the control sending the message not a
- sibling window.
-
- - To distinguish one help button BN_CLICKED message from
- another you must do the following:
-
- 1. Trap the WM_COMMAND message sent to the parent of the
- message box.
-
- 2. Use GetWindowText to retrieve the message text from the
- static control identified by LOWORD(lParam) and compare this
- text with known message texts. If it matches, display the
- appropriate help.
-
-
- SFXINPUTBOX:
-
- - This function creates and displays an SFX input box that
- prompts the user for a single line of input text.
-
- - Syntax
-
- int SFXInputBox(HWND hWndParent, const char far* caption,
- const char far* prompt, char far* text,
- int maxCount = 144, UINT style = 0)
-
- function SFXInputBox(WndParent: HWnd; Caption, Prompt, Text: PChar;
- MaxCount: Integer; Style: Word): Integer;
-
-
- Parameter Description
- -----------------------------------------------------------
- hWndParent Identifies the window that owns the input box.
- This can be NULL.
-
- caption Points to a null-terminated character string to
- be use for the window caption.
-
- prompt Points to a null-terminated character that is
- displayed above the edit control as a prompt.
-
- text Points to a buffer that returns the text retrieved
- from the user.
-
- maxCount Maximum number of characters to copy into the buffer .
-
- style Specifies the input box window style. style can be
- one of the following values:
-
- Value Description
- -------------------------------------------
- MWS_SFXFRAME SFXFrame with light gray client
- area
- MWS_GRAY Modal frame with raised light
- gray client area
- MWS_GLAZE Modal frame with raised glaze
- client area
- MWS_STEEL Modal frame with raised steel
- client area
- MWS_3DGRAY 3DFrame with raised light gray
- client area
- MWS_3DGLAZE 3DFrame with raised glaze client
- area
- MWS_3DSTEEL 3DFrame with raised steel client
- area
-
- - The return value specifies the outcome of the function. It
- is zero if there is not enough memory to create the input box.
- Otherwise, it is one of the following values:
-
- Return Value Description
- -----------------------------------------------------------
- IDOK OK button pressed
- IDCANCEL Cancel button pressed
-
- - To use an input box in your application you must set up a
- buffer and pass it as the 'text' parameter in SFXInputBox. Any
- text in the buffer will be displayed in the edit control when
- the input box first appears. If the buffer is empty the edit
- control is blank. If the input box title is Password the edit
- control is created with the ES_PASSWORD flag. The text passed
- as 'prompt' appears above the edit control as a prompt to the
- user.
-
- - If the user enters or changes the text in the edit control and
- selects the OK button the content of the edit control is copied
- into the buffer, up to maxCount characters. If the user
- selects the Cancel button the buffer remains unchanged.
-
-
- CENTERWINDOW:
-
- - Syntax
-
- void CenterWindow(HWND hWndParent, HWND hWnd)
-
- procedure CenterWindow(ParentWnd, Wnd: HWnd);
-
-
- Parameter Description
- -----------------------------------------------------------
- hWndParent Handle of parent window..
-
- hWnd Handle of window to center.
-
- - CenterWindow moves hWnd to the center of hWndParent. If
- hWndParent is NULL hWnd is centered over the desktop window.
-
-
-
- ----------------------
- 21. PRIVATE MESSAGES.
- ----------------------
-
- - SFX200.DLL uses the following private messages to modify the
- appearance and/or behaviour of its custom controls, dialogs
- and windows.
-
- WM_ALIGNTOOLBAR
- WM_DRAWPERCENT
- WM_GETCHECK
- WM_RESETPERCENT
- WM_SETBITMAP
- WM_SETBRUSH
- WM_SETCHECK
- WM_SETPEN
- WM_SFXCTLCOLOR
- WM_SFXAPPLYCOLOR
- WM_SFXAPPLYFONT
- WM_SFXHELP
- WM_SFXINITDIALOG
-
- WM_ALIGNTOOLBAR:
-
- - wParam = 0 ; /* not used, must be zero */
-
- lParam = 0L ; /* not used, must be zero */
-
- - This message has no parameters. It is used to re align an SFX
- toolbar that has one of the following toolbar style flags set:
-
- Flag Description
- -----------------------------------------------------------
- MTB_TOP Aligns the toolbar along the top of the parent's
- client area.
- MTB_LEFT Aligns the toolbar along the left edge of the parent's
- client area.
- MTB_RIGHT Aligns the toolbar along the right edge of the parent's
- client area.
- MTB_BOTTOM Aligns the toolbar along the bottom of the parent's
- client area.
- MTB_STATUS Aligns the toolbar along the bottom of the parent's
- client area.
-
- - An application should return zero if
- it processes this message.
-
-
- - A WM_ALIGNTOOLBAR message should be sent to an aligned
- toolbar every time its parent window is resized.
-
-
- WM_DRAWPERCENT:
-
- - wParam = percent ; /* percentage to draw */
-
- lParam = 0L ; /* not used, must be zero */
-
-
- Parameter Description
- -----------------------------------------------------------
- percent Value of wParam. Specifies the percent complete.
- It must be a value in the range 0 to 100%.
-
- - This message must be sent to a percent gauge to tell it what
- percentage to draw.
-
- - The return value is 1 when the percentage drawn reaches 100%
- (complete). Otherwise, it is zero.
-
-
- WM_GETCHECK
-
- - wParam = toolId ; /* resource Id of toolbar button */
-
- lParam = 0L ; /* not used, must be zero */
-
-
- Parameter Description
- -----------------------------------------------------------
- toolId Value of wParam. Specifies the resource Id of
- toolbar button whose check state is to be
- retrieved.
-
- - This message is sent to an SFX toolbar to retrieve the
- check state of the tool identified by toolId.
-
- - The return value is 1 if the button identified by toolId is
- checked. Otherwise, it is zero.
-
- - This message is only valid for toolbars created with the MTB_RADIO
- style flag.
-
-
- WM_RESETPERCENT:
-
- - wParam = 0 ; /* not used, must be zero */
-
- lParam = 0L ; /* not used, must be zero */
-
- - This message has no parameters. The message is sent to a percent gauge
- to reset the percentage drawn to zero.
-
- - This message is only valid for toolbars created with the MTB_RADIO
- style flag.
-
- - An application should return zero if it processes this
- message.
-
-
- WM_SETBITMAP (for Bitmap Buttons):
-
- - wParam = newId ; /* new resource Id of button */
-
- lParam = 0L ; /* not used, must be zero */
-
-
- Parameter Description
- -----------------------------------------------------------
- newld Value of wParam. Specifies the new resource Id.
-
- - This message is sent to an SFX button to change its ID.
- If the button is a bitmap button, the bitmap(s) are updated to
- reflect the new ID.
-
- - You can use this message to change the bitmap(s) and ID of an
- existing Borland-style button or Bitmap button. The new
- bitmap(s) must follow the Borland numbering system.
-
- - An application should return zero if it processes this message
-
-
- WM_SETBITMAP (for Icon Buttons, Dialogs and Windows):
-
- - wParam = hIcon ; /* handle to a valid icon */
-
- lParam = 0L ; /* not used, must be zero */
-
-
- Parameter Description
- -----------------------------------------------------------
- hIcon Value of wParam. Specifies the valid icon
- handle.
-
- - This message is sent to an SFX Icon button to set the icon
- displayed by the button. The button ID is not changed.
-
- - This message is sent to an MWS_SFXCAPTION style dialog or window
- to set the icon to displayed in the title bar.
-
- - An application should return zero if it processes this message
-
-
- WM_SETBITMAP (for Static controls):
-
- - wParam = 0 ; /* not used, must be zero */
-
- lParam = (LPARAM)(LPCSTR)lpsz; /* address of bitmap title string */
-
-
- Parameter Description
- -----------------------------------------------------------
- lpsz Value of lParam. Points to a null terminated
- string that is the character resource ID of the
- bitmap to be displayed.
-
- - This message is sent to an SFX static control to change the
- static bitmap. Since static bitmaps are loaded by
- name, lParam must point to a null terminated string that is
- the new bitmap name.
-
-
- WM_SETBITMAP (for Toolbars):
-
- - wParam = newId; /* new toolbar button Id */
-
- lParam = currentId; /* current toolbar button Id*/
-
-
- Parameter Description
- -----------------------------------------------------------
- newld Value of wParam. Specifies the new toolbar
- button Id. If this button Id has predefined
- resource bitmap(s), the bitmaps are also changed.
-
- currentld Value of lParam. Specifies the current toolbar
- button Id.
-
- - This message is sent to an SFX toolbar to change a toolbar
- button ID and Bitmap(s), if any. The button ID's in title text
- string that was used to create the toolbar are also updated.
-
- - An application should return zero if it processes this message
-
-
- WM_SETBRUSH
-
- - wParam = hBrush ; /* handle to a valid brush */
-
- lParam = 0L ; /* not used, must be zero */
-
-
- Parameter Description
- -----------------------------------------------------------
- hBrush Value of wParam. Specifies a valid brush handle.
-
- - This message can be sent to the following SFX objects in response
- to a WM_SFXCTLCOLOR message:
-
- Object Description
- -----------------------------------------------------------
- SFXBUTTION Used to paint the button face. The default is
- light gray.
- SFXSTATIC Used to paint the static background. The default
- is light gray.
- SFXSHADE Used to paint the shade background. The default
- is light gray.
- SFXRADIO Used to paint the radio button check mark. The
- default is black.
- SFXPERCENT Used to paint the percent gauge background. The
- default is off-white.
- SFX DIALOGS Used to paint the dialog box background.
-
- SFXCOMBOBOX Used to paint the space between the edit control
- and the button in a drop down combo box. The
- default is light gray.
-
- - An application should return zero if it processes this message
-
-
- WM_SETCHECK:
-
- - wParam = toolId ; /* resource Id of toolbar button */
-
- lParam = fCheck ; /* check state */
-
-
- Parameter Description
- -----------------------------------------------------------
- toolId Value of wParam. Specifies the resource Id of
- the toolbar button that is to have its check
- state changed.
-
- fCheck Value of lParam. Specifies the new check state.
- It can be unchecked (0) or checked (1).
-
- - This message is sent to an SFX toolbar to set the check
- state of the toolbar button identified by toolId.
-
- - An application should return zero if it processes this message
-
- - This message is only valid for toolbars created with the MTB_RADIO
- style flag.
-
-
- WM_SETPEN:
-
- - wParam = hPen ; /* handle to a valid pen */
-
- lParam = 0L ; /* not used, must be zero */
-
-
- Parameter Description
- -----------------------------------------------------------
- hPen Value of wParam. Specifies a valid pen handle.
-
- - This message is sent to an SFX check box to set its check mark color.
- It should be sent in response to a WM_SFXCTLCOLOR message.
-
- - An application should return zero if it processes this message
-
-
- WM_SFXCTLCOLOR:
-
- - hDCChild = (HDC) wParam; /*child-window display context*/
- hWndChild = (HWND) LOWORD (lParam); /* handle of child window */
- ctlType = (int) HIWORD (lParam); /* type of SpecialFX control */
-
- Parameter Description
- -----------------------------------------------------------
- hDCChild Value of wParam. Identifies the display context
- of the child window.
- hWndChild Value of the low order word of lParam. Identifies
- the child window.
- ctlType Value of the high order word of lParam. Identifies
- the type of control sending the message. It can be
- one of the following values:
-
- Value Description
- -------------------------------------------
- SFXCTLCOLOR_BUTTON Button
- SFXCTLCOLOR_CHECK Check box
- SFXCTLCOLOR_COMBO Combo box
- SFXCTLCOLOR_DLG Dialog box
- SFXCTLCOLOR_RADIO Radio button
- SFXCTLCOLOR_SHADE Group shade
- SFXCTLCOLOR_STATIC Static control
- SFXCTLCOLOR_PERCENT Percent gauge
-
- - This message is sent to the parent of an SFX control when
- the control is about to be painted.
-
- - An application should return zero if it processes this message
-
- - This message behaves just like the WM_CTLCOLOR message with
- one exception; it does not use a return value. Instead, you
- must use the SendMessage function to return a valid brush or
- pen handle. You can use this message to set the following:
-
- - You can also set the text color for text buttons, check boxes,
- radio buttons, group shades, static controls, combo boxes,
- percent gauges and dialogs using the SetTextColor function. The
- default text color is black.
-
-
- WM_SFXAPPLYCOLOR:
-
- - wParam = 0; /* not used, must be zero */
-
- lParam = (LPARAM) rgbColor; /* RGB color value */
-
-
- Parameter Description
- -----------------------------------------------------------
- rgbColor Value of lParam. Specifies an RGB color value.
-
- - This message is sent by SFX200.DLL to the owner of an SFX
- color common dialog box when the user presses the 'Apply'
- button. The value of rgbColor is the RGB color selected by the
- user.
-
-
- WM_SFXAPPLYFONT:
-
- - wParam = hFont; /* handle to a valid font */
-
- lParam = (LPARAM) rgbColor; /* RGB color value of hFont */
-
-
- Parameter Description
- -----------------------------------------------------------
- hFont Value of wParam. Specifies a valid font
- handle.
-
- rgbColor Value of lParam. Specifies the RGB color value
- of hFont.
-
- - This message is sent by SFX200.DLL to the owner of an SFX
- font common dialog box when the user presses the 'Apply'
- button. 'hFont' is the handle to a newly created font selected
- by the user. 'rgbColor' is the RGB color value of the
- selected font.
-
- - You are responsible for deleting hFont!
-
-
- WM_SFXHELP:
-
- - wParam = hWndTemplate /* handle to dialog box */
-
- templateType = HIWORD(LPARAM) /* Template identifier */
-
-
- Parameter Description
- -----------------------------------------------------------
- hWndTemplate Value of wParam. Handle to the dialog box
- sending the message.
-
- templateType Value of the high order word of lParam. Specifies
- the type of SFX common dialog box template sending
- the message. It can be one of the following values:
-
- Template Meaning
- -------------------------------------------
- DLG_COLOR Choose color dialog box.
- DLG_EXCOLOR Extended choose color.
- DLG_OPENSAVE Open save dialog box.
- DLG_EXOPENSAVE Open save with extended file selection.
- DLG_PRINT Print dialog box.
- DLG_PRINTSETUP Print setup dialog box.
- DLG_FIND Find dialog box
- DLG_REPLACE Replace dialog box.
- DLG_FONT Font dialog box.
- DLG_EXFONT Extended font dialog box
- DLG_OPENDIR Open directory dialog box
-
- - This message is sent by SFX200.DLL to the owner of an SFX
- common dialog box when the user presses the 'Help' button.
- You can use templateType to identify the dialog box type
- sending the message.
-
-
- WM_SFXINITDIALOG:
-
- - wParam = hDlg ; /* handle to a dialog box */
-
- templateType = HIWORD(LPARAM) /* Template idenifier */
-
-
- Parameter Description
- -----------------------------------------------------------
- hDlg Value of wParam. Handle to an SFX common dialog
- box.
-
- templateType Value of the high order word of lParam. Specifies
- the type of SFX common dialog box template sending
- the message. It can be one of the following values:
-
- Template Meaning
- -------------------------------------------
- DLG_COLOR Choose color dialog box.
- DLG_EXCOLOR Extended choose color.
- DLG_OPENSAVE Open save dialog box.
- DLG_EXOPENSAVE Open save with extended file selection.
- DLG_PRINT Print dialog box.
- DLG_PRINTSETUP Print setup dialog box.
- DLG_FIND Find dialog box
- DLG_REPLACE Replace dialog box.
- DLG_FONT Font dialog box.
- DLG_EXFONT Extended font dialog box
- DLG_OPENDIR Open directory dialog box
-
- - This message is sent to the parent of an SFX common dialog
- box from the dialog function's WM_INITDIALOG message response,
- before WM_INITDIALOG returns. This gives you a chance to do
- some extra initialization before the common dialog box is displayed.
-
- - This message was added so you could optionally set the
- MWS_SFXCAPTION flag using SetWindowLong and specify a custom icon
- by sending the dialog box a WM_SETBITMAP message.
-
- WM_SFXNCACTIVATE:
-
- - wParam = fActive /* activation flag*/
-
- - lParam = 0 ; /* not used, must be zero */
-
- Parameter Description
- -----------------------------------------------------------
- fActive Value of wParam. Specifies the activation state of
- a window's title bar. If fActive is 1, the title bar
- is active. If fActive is 2, the title bar is inactive.
- If fActive is 0, the default Window function activates
- and inactivates the title bar.
-
- - An application should return zero if it processes this message
-
- - The WM_NCACTIVATE message is used by an SFX dialog box or
- window for its own use and is not passed onto the default
- window function. To set a title bar's activation state you must
- send the dialog box or window a WM_SFXNCACTIVATE message. The
- value of wParam sets an internal flag that specifies the title
- bar's activation state. Once set, the activation state can only
- be changed by sending another WM_SFXNCACTIVATE message.
-
- ========================= End of SFX200.TXT ==========================
-
-