cbitmap

Does MemoryDC occupied memory or the memory on video card?

I am using the following code to create a compatible DC: m_pDC=new CDC(); VERIFY(m_pDC->CreateCompatibleDC(sampleDC); CBitmap bitmap; if (bitmap.CreateCompatibleBitmap(sampleDC, rect.Width(), rect.Height())) { m_pOldBitmap = m_pDC->SelectObject(&bitmap); } My question is does CDC CBitmap occupied memory ? If it is using memory, wh...

how to add bitmap image to buttons in MFC?

hello frnds, I am Trying to add an image to an existing button..I have done that to an extent, the problem is I can add an ownerdrawn Image but am not able to add the extact image that I want.. for the example see the below code CButton* pBtn= (CButton*)GetDlgItem(ID_WIZBACK); pBtn->ModifyStyle( 0, BS_ICON ); HICON h...

Create a CBitmap from Resources ID

I need to fill a CImageList with a number of bitmaps which are stored in separate bmp files (rather than as a single bmp with numerous parts). I assume I need to create a CBitmap so I can call the Add method of CImageList. So how might one create a CBitmap object using only MFC Resource IDs? ...

How do you scale a CBitmap object?

I've loaded a CBitmap object from a resource ID, and I'm now wanting to scale it to 50% its size in each dimension. How might I go about this? ...

Can't Display Bitmap of Higher Resolution than CDC area

Hi there dear gurus and expert coders. i am not gonna start with im a newbie and don't know much about image programming but unfortunately those are the facts :( I am trying to display an image from a bitmap pointer *ImageData which is of resolution 1392x1032. I am trying to draw that at an area of resolution or size 627x474. However,...