Вот здесь загружаю image в клиентскую область :
| Код | //Image set on client rectangle void DrawBitmap(HDC hDC, const RGB_BITMAP *Bitmap,int x,int y) { int oHorizontal=0, oVertical=0; BITMAPINFO bi; HPEN hPen, hOldPen; RECT WndRect; GetClientRect(hWnd,&WndRect);
bi.bmiHeader.biSize=sizeof(BITMAPINFOHEADER); bi.bmiHeader.biBitCount=24; bi.bmiHeader.biWidth=Bitmap->width; bi.bmiHeader.biHeight=Bitmap->height; bi.bmiHeader.biPlanes=1; bi.bmiHeader.biCompression=BI_RGB; bi.bmiHeader.biClrUsed=0;
hPen=CreatePen(PS_SOLID,1,RGB(255,255,255)); hOldPen=SelectObject(hDC,hPen); x=Bitmap->width; y=Bitmap->height;
SelectObject(hDC,hOldPen); DeleteObject(hPen); SetDIBitsToDevice(hDC,-oHorizontal,-oVertical,Bitmap->width, Bitmap->height,0,0,0,Bitmap->height,Bitmap->Data,&bi, DIB_PAL_COLORS);
};
|
А как это сделать в Picture control на Dialoge? |