Bitmaps on buttons
Posted on 1998-12-29
I've just starting learning VC++ and I ran into a problem which I cannot find the solution to - setting the bitmap of a button.
The first thing I did was create the button and name it ID_TESTBUTT. I also clicked the Bitmap checkbox in the Sytles tab of the properties box. Next I added the variable m_testbutt to the ID_TESTBUTT id with CButton as the type, using the class wizard. After that I created an icon and changed its id to TESTBUTT_ICON. Lastly, I added this code to OnInitDialog() in the dialog's .cpp file:
and tried to compile, but I got this error:
error C2664: 'SetBitmap' : cannot convert parameter 1 from 'char *' to 'struct HBITMAP__ *'
What am I doing wrong?! I would really appreciate any feedback! Thanks even if you read this :)