|
-
April 21st, 1999, 04:52 PM
#1
image in API button?
Can somebody tell me how to attach a bitmap to a button using Windows API only? Thanks in advance!
Thomas
-
April 22nd, 1999, 01:31 AM
#2
Re: image in API button?
Hello,
If you use MFC it's very easy
1 ) for eatch button create 3 bitmap resource
call
Button_D => Img button Down
Button_F => Img button Focus
Button_U => Img button Up
2 ) create your button ( don't use classwizard )
- Create the button in your Dlg and call it IDC_PUSH_BUTTON ( for example ), in the area where you put text, put Button_ don't forgat to put the _, and Activate the flag Ownerdraw.
- CBitmapButton c_My_Button; ( in header file .h )
- On the OnInitDialog or the Init fonction of your SDI or MDI ( .cpp ):
c_My_Button; = new CBitmapButton;
VERIFY ( c_My_Button; -> AutoLoad ("Put here the name of the button resource ex : IDC_PUSH_BUTTON ), this ));
A+,
Arnaud Chainard at :
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|