Greetings I have a small WIN32 program and I want to add some text in the white part on the main window. Please tell me how to add the control to the window and how to make the text say something. Thx!
Greetings I have a small WIN32 program and I want to add some text in the white part on the main window. Please tell me how to add the control to the window and how to make the text say something. Thx!
If you want to display text on the window, the easiest way is with the TextOut() function.
Remember to include <string.h> if you use strlen().Code:PAINTSTRUCT ps; int x=0, y=0; char szBuffer[]="Hello world"; HDC hdc=BeginPaint(hwnd, &ps); SetBkMode(hdc, TRANSPARENT); //Sets background transparent TextOut(hdc, x, y, szBuffer, strlen(szBuffer)); EndPaint(hwnd, &ps);