用VS2005,新建了一个WIN32 APPLICATION,并在其中建立了一个CPP,就一个。
键入如下代码,编译报错,请问这个是什么问题???#include <windows.h>
#include <tchar.h>
#include <stdio.h>LRESULT CALLBACK WindowProc(
  HWND hwnd, 
  UINT uMsg, 
  WPARAM wParam, 
  LPARAM lParam 
); int WINAPI WinMain(
  HINSTANCE hInstance, 
  HINSTANCE hPrevInstance, 
  LPWSTR lpCmdLine, 
  int nShowCmd 
)
{
static TCHAR szAppName[] = TEXT("HelloWin");
WNDCLASS WndCls;
HWND hWnd;
MSG Msg; WndCls.cbClsExtra = 0;
WndCls.cbWndExtra = 0;
WndCls.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
WndCls.hCursor = LoadCursor(NULL, IDC_ARROW);
WndCls.hIcon = LoadIcon(NULL, IDI_APPLICATION);
WndCls.hInstance = hInstance;
WndCls.lpfnWndProc = WindowProc;
WndCls.lpszClassName = szAppName;
WndCls.lpszMenuName = NULL;
WndCls.style = CS_VREDRAW | CS_HREDRAW; if (!RegisterClass(&WndCls))
{
MessageBox(NULL, TEXT("This program requries Windows NT!"),
szAppName, MB_ICONERROR);
return 0;
}
hWnd = CreateWindow(
szAppName,
TEXT("HelloWin Caption"),
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
NULL,
NULL,
hInstance,
NULL);
ShowWindow(hWnd, nShowCmd);
UpdateWindow(hWnd);

while (GetMessage(&Msg, NULL, 0, 0))
{
TranslateMessage(&Msg);
DispatchMessage(&Msg);
} return Msg.wParam;
}LRESULT CALLBACK WindowProc(
  HWND hwnd, 
  UINT uMsg, 
  WPARAM wParam, 
  LPARAM lParam 
)
{
HDC hDC;
PAINTSTRUCT ps;
RECT rect;
switch (uMsg)
{
case WM_CREATE:
return 0;
case WM_PAINT:
hDC = BeginPaint(hwnd, &ps);
GetClientRect(hwnd, &rect);
DrawText(hDC,
TEXT("HelloWin 20060917"),
-1,
&rect,
DT_SINGLELINE | DT_CENTER | DT_VCENTER);
EndPaint(hwnd, &ps);
return 0;
case WM_DESTROY:
PostQuitMessage(0);
return 0;
}
return DefWindowProc(hwnd, uMsg, wParam, lParam);
}------ Build started: Project: 20060917, Configuration: Debug Win32 ------
Compiling...
HelloWin.cpp
f:\vc\hellowin\20060917\20060917\hellowin.cpp(18) : error C2731: 'WinMain' : function cannot be overloaded
        f:\vc\hellowin\20060917\20060917\hellowin.cpp(12) : see declaration of 'WinMain'
f:\vc\hellowin\20060917\20060917\hellowin.cpp(62) : warning C4244: 'return' : conversion from 'WPARAM' to 'int', possible loss of data
Build log was saved at "file://f:\VC\HelloWin\20060917\20060917\Debug\BuildLog.htm"
20060917 - 1 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========