Fortune Telling Collection - Comprehensive fortune-telling - Pocket abalone velocity algorithm

Pocket abalone velocity algorithm

# include & ltwindows.h & gt

LRESULT calls back WndProc(HWND, UINT, WPARAM, lparam);

int WINAPI WinMain(h instance h instance,HINSTANCE hPrevInstance,PSTR szCmdLine,int iCmdShow)

{

Static tchar szappnume [] = text ("hello win");

HWND hWnd

Monosodium glutamate;

WNDCLASS wndclass

wnd class . style = CS _ HREDRAW | CS _ VREDRAW;

wndclass.lpfnWndProc = WndProc

wnd class . cbclsextra = 0;

wnd class . cbwndextra = 0;

wnd class . h instance = h instance;

Wndclass.hIcon = LoadIcon(NULL, IDI _ application);

wnd class . hcursor = load cursor(NULL,IDC _ ARROW);

wnd class . HBR background =(HBRUSH)GetStockObject(WHITE _ BRUSH);

wndclass.lpszMenuName = NULL

wnd class . lpsz class name = szAppNume;

If (! register class(& amp; wndclass))

{

MessageBox(NULL, TEXT ("This program needs Windows NT!") ),szAppNume,MB _ icon error);

Returns 0;

}

HWnd = CreateWindow(szAppNume,//window class name

TEXT(" Hello program "),//window title

WS_OVERLAPPEDWINDOW,//window style

CW_USEDEFAULT,//Initial X position

CW_USEDEFAULT,//Initial Y position

CW_USEDEFAULT,//Initial X size

CW_USEDEFAULT,//Initial Y dimension

NULL,//parent window handle

NULL,//window menu handle

HInstance,//program instance handle

NULL); //Create parameters

ShowWindow(hWnd,icmd show);

Update window (hwnd);

while(GetMessage(& amp; msg,NULL,0,0))

{

Translate message (& monosodium glutamate);

dispatch message(amp; Monosodium glutamate);

}

Return to msg.wParam

}

LRESULT calls back WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam).

{

HDC hdc

PAINTSTRUCT ps

RECT rectangle;

Switch (message)

{

Case WM_CREATE:

Break;

Case WM_PAINT:

hdc = begin paint(hWnd & amp; PS);

GetClientRect(hWnd & amp; rect);

DrawText(hdc, Text ("Hello, Windows 2000!") ),- 1,& amprect,

DT _ single line | DT _ CENTER | DT _ VCENTER);

Top coat (hwnd &; PS);

Returns 0;

Case WM_DESTROY:

PostQuitMessage(0);

Returns 0;

}

Returns DefWindowProc(hWnd, message, wParam, lparam);

}