What's new

Bitmaps and MFC classes (VS 2005)

Cyberman

Moderator
Moderator
My application has specific requirements NO LIBRARY requirements. This means .NET C# is right out and anything that uses libraries that have to be packaged and installed (yes a simple EXE is the requirement).

However I seem to be having difficulties attempting to move bitmap data to be updated on a control I setup. There is also the issue I cannot seem to figure out how to access the elements on the form that I need to update. I am use the BCB where the form is accessable from the form structure, this is not so with MFC (obviously).

I have 2 objects I need to access, one static text object I need to update the data shown in, and another is a PictureBox I need to change a displayed bitmap in.
Suggestions on how to do these? I created a 'variable' that I can access the contents of the PictureBox object. I attempted to use the OnPaint event to update it, however this appears to not work. MFC is anoying but I'm stuck with it for now. So anyone have suggestions on how to access and alter the contents of a form control or object?

The picture object is really the one I need to update the information in the most. Oddly it's just a stupid LCD display emulation (it's an emulator surprisingly but not for anything that anyone here could be familiar with).

Currently the LCD data is being dumped to a COLORREF array that represents the pixel information and then allegedly it's being copied during OnPaint Events. I probably need a way to invalidate the control in the form, however there is no way to access the form that I can think of in MFC outside the form itself. There aren't many MFC tutorials of use on this since I cannot pass a delegate function into standard C++ code. Therefore access within the form is not possible (IE invalidating part of the form or drawing on the bitmap etc.)

Cyb
 

Top