PHP Code:
#include <windows.h>

LRESULT CALLBACK WndProc (HWNDUINTWPARAMLPARAM);

int APIENTRY WinMain(HINSTANCE hInstanceHINSTANCE hPrevInstanceLPSTR lpCmdLineint nCmdShow)

 

{

WNDCLASS WndClass;
WndClass.style 0;
WndClass.cbClsExtra 0;
WndClass.cbWndExtra 0;
WndClass.lpfnWndProc WndProc;
WndClass.hInstance hInstance;
WndClass.hbrBackground = (HBRUSH) (COLOR_WINDOW 1);
WndClass.hCursor 0;
WndClass.hIcon 0;
WndClass.lpszMenuName 0;
WndClass.lpszClassName "WinProg";

RegisterClass (&WndClass);

HWND hWindow;

hWindow CreateWindow ("WinProg","Window",WS_OVERLAPPEDWINDOW,0,0,400,400,NULL,NULL,hInstance,NULL);

ShowWindow(hWindownCmdShow);

UpdateWindow (hWindow);

MSG Message;

while (
GetMessage(&Message,NULL,0,0))
{
DispatchMessage(&Message);
}
return(
Message.wParam);
}
LRESULT CALLBACK WndProc (HWND hWndUINT uiMessageWPARAM wParamLPARAM lParam)
{
switch(
uiMessage)
{

case 
WM_DESTROY:

PostQuitMessage(0);
return 
0;
break;

default:
return 
DefWindowProc(hWnduiMessagewParamlParam);

case 
WM_PAINT:

HDC hdc;
PAINTSTRUCT ps;
hdc BeginPaint (hWnd, &ps);
hFont = (HFONTGetStockObject (SYSTEM_FONT);
SelectObject (hdc,hFont);
SetTextColor(hdc,RGB(255,0,255));
//if you want a background then remove "//" on next line
//SetBkColor(hdc, RGB(255,0,0));
SetTextAlign (hdcTA_LEFT);
Char *string1;
string1 = new char[12];
lstrcpy(string1,"SYSTEM_FONT");
TextOut(hdc,10,10,string1lstrlen(string1));
}

Description:
HDC hdc;

This is the handle to the device context object.

PAINTSTRUCT ps;

structuce:

typedef struct PAINTSTRUCT

{

HDC hdc;
BOOL fErase;
RECT rcPaint;
BOOL fRestore;
BOOL fIncUpdate;
BOOL rgbReserved[32];
} PAINTSTRUCT;

hdc = ^ look above for description

fErase = is NULL if the area of the invalid box was redrawn using hbcBackground from the WNDCLASS class.

rcPaint = it contains info for the invalid box.

Rest = not important, used by system.

Begin Paint = setup up the area for painting.

hFont = the font to use.

SelectObject = get the current preferences for use.

SetTextColor = just as it is written, it changes the text color.

SetTextAlign = Alignment of the text in a area.

Char *string1;

declares a string.

string1 = new char[12];

Allocates some memory for this pointer string.

lstrcpy function simply sets string1 up with a value.

textout simply displays the text on the window.

Format:

TextOut(HDC,x,y,string,string length);