it is windows programming - a lot of code to make a simplest thing
go to the WndProc function - this function is called by windows in case of any event occured for the main window of the program
Code:
TCHAR szHello[MAX_LOADSTRING];
LoadString(hInst, IDS_HELLO, szHello, MAX_LOADSTRING);
these two lines at the beginning of the function load string "Hello, world" from resources of the exe (just in case)
then go down to
case WM_PAINT:
this event notifies the application, that something was changed on the internal area (client rectangle) of the window and its content should be redrawn
Application retreives handle of the aray and using
Code:
DrawText(hdc, szHello, strlen(szHello), &rt, DT_CENTER);
function draws the text loaded above in the specified location of the client area of the window