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 - <b>@ id ... button bitmap</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
@ ID ... BUTTON BITMAP
Use a button with a bitmap in a dialog
------------------------------------------------------------------------------

Syntax
#include "windows.ch"
#include "topclass.ch"   --or--   #define  NO_C4WCLASS
#include "commands.ch"
@ ID  <nId>  BUTTON BITMAP  RESOURCE <cnId>
     [ TOGGLE ]  [ HELP <oHelp> ]
     [ DOWNBMP ]
     [ GRAYBMP ]
     [ GRAYDOWNBMP ]
     [ <clauses> ]

Arguments
<cnId> can be used to specify the id of a bitmap resource.

TOGGLE can be specified 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.

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

DOWNBMP should be specified 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 don't specify
this clause, the class will simulate a down state.

GRAYBMP should be specified 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.

GRAYDOWNBMP should be specified 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.

See the generic @ ID ... <ControlType> command for details of
the other <clauses> and/or parameters allowed.

Description
This command can be used to put a bitmapped button in a
dialog.  The bitmap resource must contain an image for the
default (up) state and an image for any other states (DOWNBMP,
GRAYBMP, GRAYDOWNBMP) you specified.  These extra images must
be to the right of the up image, in the final order: up image,
down image, gray image, gray down image.  All must have the
same width and height.  Each is stretched/shrunk as necessary
to fit the actual area of the button.

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.

See the generic @ ID ... <ControlType> command for other
information.

Example
@ ID  IDD_BMP BUTTON BITMAP  RESOURCE IDB_BMP


See Also: @ ID ...

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