- Win32 API I need help on
- TextOut (not really but it applies)
- SetBkColor //doesn't work
- SetTextColor //doesn't work
ok i am making a cheap old api spy to help myself learn about strings and pointers and so on and I want to do TextOut with a Black Background Rect and a White Text face and i try doing it like so
Code:
COLORREF cBack, cTxt;
char txtOut = "Some Text";
cBack = RGB(0, 0, 0);
cTxt = RGB(255, 255, 255);
SetBkColor(GetDC(hwnd), cBack);
SetTextColor(GetDC(hwnd), cTxt);
TextOut(GetDC(hwnd), 5, 5, txtOut, strlen(txtOut));
And basicly my window gets Text on it but it is not formated with the color values i used it is using the default.
so what is the problem? I thought it might be that be the COLORREF coming up bad but i used FillRect to flash my windw RGB and it works, so any ideas?
Thanks