Vintik
July 27th, 2006, 04:28 AM
Hello people,
I have a problem with creating static control with Background Image.
1. When I process WM_ERASEBKGND and set the Background Image, I can see only the text of the control, but that image is under the text.
2. When I use SS_BITMAP style for the control and than use STM_SETIMAGE to the control to set the image, I can't output the text. So I can't see the text on the control.
SendMessage(hStatic, STM_SETIMAGE, (WPARAM) IMAGE_BITMAP, (LPARAM) hBmpStatic);
........
RECT r;
HDC sdc = GetDC(hStatic);
GetClientRect(hStatic, &r);
SetBkMode(sdc, OPAQUE);
BeginPath(sdc);
TextOut(sdc, r.left, r.top, "Some text", 6);
EndPath(sdc);
DeleteDC(sdc);
Can any guru help me? Help plz
I have a problem with creating static control with Background Image.
1. When I process WM_ERASEBKGND and set the Background Image, I can see only the text of the control, but that image is under the text.
2. When I use SS_BITMAP style for the control and than use STM_SETIMAGE to the control to set the image, I can't output the text. So I can't see the text on the control.
SendMessage(hStatic, STM_SETIMAGE, (WPARAM) IMAGE_BITMAP, (LPARAM) hBmpStatic);
........
RECT r;
HDC sdc = GetDC(hStatic);
GetClientRect(hStatic, &r);
SetBkMode(sdc, OPAQUE);
BeginPath(sdc);
TextOut(sdc, r.left, r.top, "Some text", 6);
EndPath(sdc);
DeleteDC(sdc);
Can any guru help me? Help plz