Win32 WndProc Name: why can't I change its name?
I have compiled a simple win32 app successfully with bc++ (2 lines excerpt only):
LRESULT 开发者_Go百科CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
wincl.lpfnWndProc = WindowProcedure;
Why can't I rename WindowProcedure and compile this:
LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);
wincl.lpfnWndProc = WndProc;
as error message gives:
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland Error: Unresolved external 'stdcall WndProc(HWND *, unsigned int, unsigned int, long)' referenced from C:\PROGRAMMING\SALLY\WIN32TUTORIAL\MAIN.OBJ
This is a linker error, not a compiler error. It looks like you have renamed the declaration but not the definition. You need to rename the definition (the part that includes the {body of the function}).
精彩评论