I have take a look at the possibility of the MFC to handle the button.
1) there a classe CButton which can create a button (radio, standart,
checkbox, etc...)
2) this class can accept a picture associated with the created button
3) this class can let you the possibilty to draw yourself your button
(diffucult apparently, but usefull for us) (BS_OWNERDRAW )
4) there is another derived class : CBimapButton wich can handle a button
whit 3 pictures :
- one for the standart state
- one for the mouseover state
- one for the clicked state
in fact like a rollover in HTML/javascript or Flash ...
Please take a look at the sample for MSDN under.
Thanks
--
Jean-marie LAFON ([EMAIL PROTECTED])
***************************************************************************
*********************
FOR INFORMATION (extract of the MSDN)
CButton::Create
This member function creates the Windows button control and attaches it to
the CButton object.
You construct a CButton object in two steps. First call the constructor,
then call Create.
Syntax
BOOL Create( LPCTSTR lpszCaption, DWORD dwStyle, const RECT& rect, CWnd*
pParentWnd, UINT nID );
Button Styles
BS_AUTOCHECKBOX Same as a check box, except that a check mark appears in
the check box when the user selects the box; the check mark disappears the
next time the user selects the box.
BS_AUTORADIOBUTTON Same as a radio button, except that when the user
selects it, the button automatically highlights itself and removes the
selection from any other radio buttons with the same style in the same
group.
BS_AUTO3STATE Same as a three-state check box, except that the box
changes its state when the user selects it.
BS_CHECKBOX Creates a small square that has text displayed to its right
(unless this style is combined with the BS_LEFTTEXT style).
BS_DEFPUSHBUTTON Creates a button that has a heavy black border. The user
can select this button by pressing the ENTER key. This style enables the
user to quickly select the most likely option (the default option).
BS_GROUPBOX Creates a rectangle in which other buttons can be grouped.
Any text associated with this style is displayed in the rectangle�s
upper-left corner.
BS_LEFTTEXT When combined with a radio-button or check-box style, the
text appears on the left side of the radio button or check box.
BS_OWNERDRAW Creates an owner-drawn button. The framework calls the
DrawItem member function when a visual aspect of the button has changed.
This style must be set when using the CBitmapButton class.
BS_PUSHBUTTON Creates a pushbutton that posts a WM_COMMAND message to the
owner window when the user selects the button.
BS_RADIOBUTTON Creates a small circle that has text displayed to its
right (unless this style is combined with the BS_LEFTTEXT style). Radio
buttons are usually used in groups of related but mutually exclusive
choices.
BS_3STATE Same as a check box, except that the box can be dimmed as well
as checked. The dimmed state typically is used to show that a check box has
been disabled.
CButton::SetBitmap
HBITMAP SetBitmap( HBITMAP hBitmap );
Return Value
The handle of a bitmap previously associated with the button.
Parameters
hBitmap
The handle of a bitmap.
Remarks
Call this member function to associate a new bitmap with the button.
The bitmap will be automatically placed on the face of the button, centered
by default. If the bitmap is too large for the button, it will be clipped
on either side. You can choose other alignment options, including the
following:
BS_TOP
BS_LEFT
BS_RIGHT
BS_CENTER
BS_BOTTOM
BS_VCENTER
Unlike CBitmapButton, which uses four bitmaps per button, SetBitmap uses
only one bitmap per the button. When the button is pressed, the bitmap
appears to shift down and to the right.
Use the CBitmapButton class to create pushbutton controls labeled with
bitmapped images instead of text. CBitmapButton objects contain up to four
bitmaps, which contain images for the different states a button can assume:
up (or normal), down (or selected), focused, and disabled. Only the first
bitmap is required; the others are optional.
Bitmap-button images include the border around the image as well as the
image itself. The border typically plays a part in showing the state of the
button. For example, the bitmap for the focused state usually is like the
one for the up state but with a dashed rectangle inset from the border or a
thick solid line at the border. The bitmap for the disabled state usually
resembles the one for the up state but has lower contrast (like a dimmed or
grayed menu selection).
These bitmaps can be of any size, but all are treated as if they were the
same size as the bitmap for the up state.
Various applications demand different combinations of bitmap images: