Hallo,
die Erstellung eines simplen Fensters klappt nicht ganz so wie ich mir das vorstelle.
Fehlermeldung ist
--
Kompilierung läuft...
Uebung2.c
Linker-Vorgang läuft...
Uebung2.obj : error LNK2001: Nichtaufgeloestes externes Symbol _WndProc@16
Debug/Gampp Uebeung2.exe : fatal error LNK1120: 1 unaufgeloeste externe Verweise
Fehler beim Ausführen von link.exe.
--
#define STRICT
#include <windows.h>
LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);
HWND hMainWnd;
HINSTANCE hInstance;
MSG msg;
WNDCLASS wndclass;
int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpszCmdLine, int nCmdShow)
{
hInstance = hInst;
wndclass.lpszClassName = "Grabo Uebung";
wndclass.hInstance = hInst;
wndclass.lpfnWndProc = WndProc;
wndclass.style = CS_HREDRAW|CS_VREDRAW;
wndclass.hIcon = LoadIcon (NULL, IDI_EXCLAMATION);
wndclass.hCursor = LoadCursor (NULL, IDC_CROSS);
wndclass.hbrBackground = (HBRUSH)GetStockObject (WHITE_BRUSH);
wndclass.lpszMenuName = NULL;
wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = 0;
RegisterClass (&wndclass);
hMainWnd = CreateWindow
(
"Grabo Uebung",
"Meine Uebung",
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, 0,
CW_USEDEFAULT, 0,
NULL,
NULL,
hInst,
NULL);
ShowWindow (hMainWnd, nCmdShow);
while (GetMessage (&msg, NULL, 0, 0))
{
TranslateMessage (&msg);
DispatchMessage (&msg);
}
return (int)msg.wParam;
}
Kann jemand helfen?
Danke!
Gruß,
DS