An Introduction to GDI
To paint theclient area of your window, you use Windows' Graphics Device Interface (GDI)functions. Windows provides several GDI functions for writing text strings tothe client area of the window. We've already encountered the DrawTextfunctionin the last chapter, but the most commonly used text output function isundoubtedly TextOut. This function has the following format:
TextOut (hdc, x, y, psText, iLength);
TextOutwritesa character string to the client area of the window. The psTextargument is apointer to the character string, and iLengthis the length of the string incharacters. The xand yarguments define the starting position of the characterstring in the client area.