Re: Add new image (bitmaps)
In CMainFrame, I added WM_PAINT:
in MainFrm.cpp,
void CMainFrame::OnPaint()
{
CPaintDC dc(this); // device context for painting
// TODO: Add your message handler code here
CBitmap Bmp1;
CDC MemDC1;
// Load the bitmap from the resource
Bmp1.LoadBitmap(IDB_MYLOGO);
// Create a memory device compatible with the above CPaintDC variable
MemDC1.CreateCompatibleDC(&dc);
// Select the new bitmap
CBitmap *BmpPrevious = MemDC1.SelectObject(& Bmp1);
// Copy the bits from the memory DC into the current dc
dc.BitBlt(20, 10, 436, 364, & MemDC1, 0, 0, SRCCOPY);
// Restore the old bitmap
dc.SelectObject(BmpPrevious);
// Do not call CView::OnPaint() for painting messages
}
but still not working. Please help. Thanks.
Regards,
Kenji
On Nov 29, 2:29 am, aloha...@gmail.com wrote:
Hi,
After creating sample application via the App Wizards(exe) -> Single
Document,
I imported new bitmaps.
now how can I add new bitmaps image to be place in the frame center
area ?
Thanks.
Kenji