Original Post
OK here my code and yes i did an windows32 api project and all linked stuff o and i got visual c++ 6.0 soo here the code.
#include <windows.h>
#include <stdio.h>
LRESULT CALLBACK WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
HWND hwnd;
MSG msg;
WNDCLASSEX wc;
wc.cbSize = sizeof(wc);
wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = LoadIcon(NULL, IDI_WINLOGO);
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
wc.lpszMenuName = NULL;
wc.lpszClassName = "Window Class1";
wc.hIcon = LoadIcon(NULL, IDI_WINLOGO);
RegisterClassEx(&wc);
hwnd = CreateWindow ("Window Class 1"
"My First Window",
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
NULL,
NULL,
hInstance,
NULL);
ShowWindow(hwnd, nCmdShow);
UpdateWindow(hwnd);
while (GetMessage(& msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}
LRESULT CALLBACK WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
switch(Msg)
{
case WM_CREATE:
break;
case WM_SIZE:
break;
case WM_PAINT:
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
}
return DefWindowProc(hWnd, Msg, wParam, lParam);
}
and here is the error i get
Compiling...
win main.cpp
C:\Windows\Bureau\dump\c++\My project\windows 32 api\prj1\win main.cpp(46) : warning C4003: not enough actual parameters for macro ''CreateWindowA''
C:\Windows\Bureau\dump\c++\My project\windows 32 api\prj1\win main.cpp(46) : error C2059: syntax error : '')''
Error executing cl.exe.
Please tell me what i have to do because before i was doing windows32 api and all went well do i have to reinstall
Kevin