A question about DrawText

In the following simple drawing code (handles the WM_PAINT message):

hdc = BeginPaint(hwnd, &ps);
GetClientRect(hwnd, &rect);
DrawText(hdc, "Hello world!", -1, &rect, 0);
ReleaseDC(hwnd, hdc);

The DrawText takes the client window &rect as an argument, on the other hand, the BeginPaint function sets the clipping region of the hdc to exclude any area outside the update region. So both hdc and &rect carry information about "area", which one is in real control of what area should be painted? Thanks for help.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!