Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

WButtonBitmap:Init() Method
Construct a bitmapped button control object
------------------------------------------------------------------------------

Syntax
WButtonBitmap{ <oParent>, [ <nId> ] , <aParams> , [ <lCreate> ] }
             -->   SELF

Arguments
<oParent> is the parent (owner) window object.  Just as
<oParent> is the owner of the control object, the parent's
hWnd will be the actual owner of the control's window (if it
has a window on the screen).

<nId> is an optional number.  It will (eventually) default to
self:CreateId(), but you normally specify it as the same
value as in a dialog containing the control.

<aParams> is an array   { <lToggle>, <cnResId>, [ <oHelp> ] ,
                          <lDn>, <lGray>, <lGrayDn> }
where:

<lToggle> is .T. to mean that a button press changes the
button from up to down or vice versa.  Without TOGGLE, a
button is only down as long as it is held down, i.e. as long
as the mouse left button is pressed.

<cnResId> must specify the id of a bitmap resource.

<oHelp> can be used to specify a help object.

<lDn> should be .T. if the bitmap resource contains a bitmap
to be shown when the button is logically down, as well as a
bitmap for the default (up) state.  If you  specify .F., the
class will simulate a down state.

<lGray> should be .T. if the bitmap resource contains a bitmap
to be shown when the button is logically disabled (grayed), as
well as a bitmap for the default (up) state.

<lGrayDn> should be .T. if the bitmap resource contains a
bitmap to be shown when the button is logically disabled
(grayed) and down, as well as a bitmap for the default (up)
state.

<lCreate> specifies whether the window object's Create()
method is to be invoked immediately.  Usually you want the
default (.F.).

Returns
SELF.

Description
This method initialises a button control that displays one or
more bitmaps.  By default, this method will NOT create a
window on the screen (because controls are usually
automatically created in dialogs).

As this is implemented using an owner-drawn button, to put
this control in a dialog you should use a button with the
BS_OWNERDRAW style.

Example
@ Id IDD_PRINT  Button Bitmap  ResId IDB_PRINT  Help WHelp{"Print"}


See Also: WButtonBitmap:Axit() @ ID ... BUTTON BITMAP

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson