Reputation: 147
so i have a c++ program that uses dc to draw on screen. I have a text that i want to make black, here's the code
RECT textRect;
textRect.left = 200;//adjusting the position of the text, x
textRect.top = 405;//adjusting the position of the text, y
textRect.right = combinedSize.cx;
textRect.bottom = combinedSize.cy;
SetTextColor(hdcDest, RGB(0, 0, 0));
SetBkMode(hdcDest, TRANSPARENT);
DrawText(hdcDest, text.c_str(), -1, &textRect, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
however the fill of the code is transparent, however the outline changes when i try to change the color of a text. Does anyone know how to fix it? I've also tried adding a background to this text but it is slightly larger then area of the text.
Upvotes: 0
Views: 90