Code:
void CTexPropDlg::OnPaint()
{
CClientDC dc(this);
CBitmap bmp;
HBITMAP hBmp = (HBITMAP)::LoadImage(
NULL,
"test.bmp",
IMAGE_BITMAP,
0,
0,
LR_LOADFROMFILE|LR_CREATEDIBSECTION
);
bmp.Attach(hBmp);
BITMAP bm;
bmp.GetObject(sizeof(BITMAP),&bm);
CDC dcMem;
dcMem.CreateCompatibleDC(&dc);
CBitmap *old = dcMem.SelectObject(&bmp);
dc.BitBlt(0,0,32,32,&dcMem,0,0,SRCCOPY);
dcMem.SelectObject(old);
}
ignore how ugly its formated plz all that seems to acomplish is drawing a pink square. i tried the same code in the SDI's client area and it shows my bitmap perfectly.......so idunno if its becasue im trying to draw it onto the grey dialog background or what.
Thanks