V
@ektoplasma2000
Nochmal das Thema Bitmap als Dialog-Hintergrund als Step-by-Step Anleitung :
1. HBRUSH Private-Member-Variable im Dialog anlegen :
HBRUSH hBitmapBrush;
2. In der OnInitDialog() unseren Brush mit dem Bitmap belegen:
hBitmapBrush = CreatePatternBrush( (HBITMAP)LoadImage(NULL,"C:\\bild.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE | LR_CREATEDIBSECTION | LR_DEFAULTSIZE) );
3. Message-Handler für WM_CTLCOLOR anlegen und darin folgenden Code ausführen :
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
if(nCtlColor == CTLCOLOR_DLG)
hbr = hBitmapBrush;
return hbr;
This is it...
MfG veganza
[ Dieser Beitrag wurde am 20.11.2002 um 12:03 Uhr von veganza editiert. ]