Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Unable to draw text :: no mfc
im having a problem using DrawText right after I create and show a window. What is going on here because when I post the drawtext stuff where the system calls WM_PAINT then everything goes fine what is going on is the text getting written over or what? Here is the code im using...
// ......... stuff before this
// show and update the window
hDC = BeginPaint(g_hWnd, &ps);
SetTextColor(hDC, RGB(255, 0, 0));
DrawText(hDC, "Hello World!", -1, &rect, DT_LEFT);
// stuff after this....
Can anyone help me???
Thanks for anything ahead of time
0 · ·