Drexel1718

I am having a problem displaying a bitmap button in an activeX control using MFC.. When I used the class I created to display the bitmap button in a dialog application, it works fine, but when I used it in an ActiveX Control, No bitmap was loaded. I am using resource IDs to reference the bitmap. I don't know what is wrong. Please help me..

drexel


Re: Visual C++ Language ActiveX Controls- Owner Draw Buttons

Ramkrishna Pawar

Is the bitmap resource inside the DLL You might try calling AFX_MANAGE_STATE in DLL's export function (where you try to use this resource ID).

AFX_MANAGE_STATE (MFC)






Re: Visual C++ Language ActiveX Controls- Owner Draw Buttons

Drexel1718

Yes, it is a resource inside the ActiveX control. I am not trying to use an export function.. the function that uses the resource ID is inside a library file that I am using to display the window including the bitmap button. But so far, the control can't display the bitmap button. I don't know why it is not display. When I debug the control, the SetImage() function that I use to set the image of the bitmap button returns a FALSE meaning it failed to load the bitmap.. Please Help me with my problem..





Re: Visual C++ Language ActiveX Controls- Owner Draw Buttons

Ramkrishna Pawar

Try using the macro AFX_MANAGE_STATE insode the function which uses the resource ID.