hello all,
I am trying to display a bitmap in a rectangle on a view.
I have written this to do it...
void MyView::OnDraw(..)
{
HBITMAP MyBitmap = (HBITMAP)::LoadImage(0,"bit1.bmp", IMAGE_BITMAP, 0 ,0 ,LR_LOADFROMFILE);
CStatic BitDraw;
BitDraw.Create("", SS_BITMAP, ToDraw, this);
BitDraw.SetBitmap((HBITMAP)MyBitMap);
}
I have tried changing the CStatic from an auto object
to a dynamic (using new), but still no joy.
So any ideas please?
Marcus
I am trying to display a bitmap in a rectangle on a view.
I have written this to do it...
void MyView::OnDraw(..)
{
HBITMAP MyBitmap = (HBITMAP)::LoadImage(0,"bit1.bmp", IMAGE_BITMAP, 0 ,0 ,LR_LOADFROMFILE);
CStatic BitDraw;
BitDraw.Create("", SS_BITMAP, ToDraw, this);
BitDraw.SetBitmap((HBITMAP)MyBitMap);
}
I have tried changing the CStatic from an auto object
to a dynamic (using new), but still no joy.
So any ideas please?
Marcus