|
-
March 18th, 2009, 06:34 AM
#1
How to paint color Text on background DC
I want to draw text or image on background DC, so i write code as below. But the output text is also mono. why and how to modify my program. Thanks a lot.
g_PCanvas.cdc = new CDC;
g_PCanvas.cdc->CreateCompatibleDC(NULL);
g_PCanvas.hDC = g_PCanvas.cdc->Detach();
g_PCanvas.hBitmap = CreateCompatibleBitmap(g_PCanvas.hDC, EVOLIS_MAX_WIDTH, EVOLIS_MAX_HEIGHT);
SelectObject(g_PCanvas.hDC, g_PCanvas.hBitmap);
...
...
SetTextColor(hDc, RGB(0xff,0,0xff);
retval = ExtTextOutA(hDc, x, y, ETO_CLIPPED, &rc, szText, strlen(szText), NULL);
..
best regard.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|