|
-
August 29th, 1999, 11:57 AM
#1
Associating bitmap with Button
I have followed a tuturial and done the following to associate a bitmap with button control. This is what has been called the automatic method.
1. First set the button style owner drawn, its ID IDC_PLAY
2. Then two bitmaps added with names PlayU and PlayD
3. CBitmapButton btnVariable declared
CBitmapButton btnVariable;
4. Autoload memeber function is called in OnInitDialog()
btnVariable.AutoLoad(IDC_PLAY, this);
Now this is supposed to display the bitmaps but it gives exception in debugg mode and run normally in release mode but the button does not show up on the dialog!
Can somebody advice, what is wrong with this procedure?
thankx
-
August 29th, 1999, 01:03 PM
#2
Re: Associating bitmap with Button
Try putting "Play" as the button caption.
-
August 29th, 1999, 02:31 PM
#3
Re: Associating bitmap with Button
For an example of using CBitmapButton, check out my Example 12 at http://home.earthlink.net/~railro/mfc_link.html.
Rail
------------
Recording Engineer/Software Developer
Rail Jon Rogut Software
http://home.earthlink.net/~railro/
[email protected]
-
August 30th, 1999, 11:27 PM
#4
Re: Associating bitmap with Button
I have already done this but it is not working. Can you give any other suggestion!
-
January 12th, 2000, 09:44 AM
#5
Re: Associating bitmap with Button
The Autoload function subclasses the control and you are brobably using the
DDX_Control function which also subclasses the button.
instead of using Autoload, use :
LoadBitmaps(...) and SizeToContent() functions with the DDX_Control.
It works.
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
|