Could ne one help me here? im now gettin into windows API, and I tried to manually debug it, but I cannot snatch the error. help ne one?

Here it is:

#include <windows.h>

LRESULT CALLBACK WndProc (HWND hWindow, UNIT iMessage, WPARAM wParam, LPARAM lParam);

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nShowCmd)
{
WNDCLASS kWndClass;

kWndClass.hCursor = LoadCursor (NULL, IDC_ARROW);
kWndClass.hIcon = LoadIcon (NULL, IDI_APPLICATION);
kWndClass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH);

kWndClass.hInstance = hInstance;
kWndClass.lpfnWndProc = WndProc;
kWndClass.lpszClassName = "Alex's Window";

kWndClass.lpszMenuName = NULL;

kWndClass.cbClsExtra = NULL;
kWndClass.cbWndExtra = NULL;
kWndClass.style = NULL;

if (!RegisterClass (&kWndClass))
{
return -1;
}

HWND hWindow;

hWindow = CreateWindow ("Alex's Window", "A Blank Window", WS_OVERLAPPEDWINDOW | WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL);

MSG kMessage;
while (GetMessage (&kMessage, hWindow, 0, 0))
{
TranslateMessage (&kMessage);
DispatchMessage (&kMessage)
}

return 0;
}

LRESULT CALLBACK WndProc (HWND hWindow, UNIT iMessage, WPARAM wParam, LPARAm lParam)
{
switch (iMessage)
{
case WM_CLOSE;
POSTQUITMESSAGE (0);
break;

default:
return DefWindowProc (hWindow, iMessage, wParam, lParam);
}
return 0;
}

I'd Appreciate any help! thanks ohh and here are the errors....

--------------------Configuration: Window - Win32 Debug--------------------
Compiling...
Window S.cpp
C:\Program Files\Microsoft Visual Studio\MyProjects\Window\Window S.cpp(3) : error C2061: syntax error : identifier 'UNIT'
C:\Program Files\Microsoft Visual Studio\MyProjects\Window\Window S.cpp(14) : error C2440: '=' : cannot convert from 'long (__stdcall *)(struct HWND__ *)' to 'long (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long)'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
C:\Program Files\Microsoft Visual Studio\MyProjects\Window\Window S.cpp(37) : error C2143: syntax error : missing ';' before '}'
C:\Program Files\Microsoft Visual Studio\MyProjects\Window\Window S.cpp(42) : error C2061: syntax error : identifier 'UNIT'
C:\Program Files\Microsoft Visual Studio\MyProjects\Window\Window S.cpp(44) : error C2065: 'iMessage' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\Window\Window S.cpp(46) : error C2143: syntax error : missing ':' before ';'
C:\Program Files\Microsoft Visual Studio\MyProjects\Window\Window S.cpp(47) : error C2065: 'POSTQUITMESSAGE' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\Window\Window S.cpp(51) : error C2065: 'wParam' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\Window\Window S.cpp(51) : error C2065: 'lParam' : undeclared identifier
Error executing cl.exe.

Window.exe - 9 error(s), 0 warning(s)