0

Mfc button bitmap | greyed area

Hi I have a dialog which has cbutton. This should be having a bitmap image so I am loading image in oninit function and setting bitmap on button. Post this , I am disabling button itself. I could see dialog loaded but it just displays greyed area on button rather than image. Button function is working and when I am doing other process to enable button, it just gets activated and image is visible. If again button goes to disable state, button is having greyed area instead of image Any thoughts would be of great help.

21st Jul 2021, 7:52 AM
Ketan Lalcheta
Ketan Lalcheta - avatar
5 Respostas
0
Did you solve it?
21st Jul 2021, 5:16 PM
Flash
0
if not, try CBitmapButton class. it has “LoadBitmaps”, which maybe useful in this case.
21st Jul 2021, 5:36 PM
Flash
0
I tried to use cbitmapbutton class.... I tried to pass same image id to loadbitmaps as well but it is not showing image at all
21st Jul 2021, 5:39 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
0
Okay, is it a png, jpeg or bmp? I’ll try it out. Seems interesting.
21st Jul 2021, 5:50 PM
Flash
0
BMP... I tried with same image as id to use as 4 different images. Set content also I had used... To my surprise, when I used four different images with id as id name with double quote ("id1" is string and not integer) , it breaks into default system provided one of the .h
21st Jul 2021, 5:57 PM
Ketan Lalcheta
Ketan Lalcheta - avatar