I've got VC++ 5.0 and a following code:
LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);
BOOL CALLBACK EnumWndAtch (HWND, LPARAM);
LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
//here I call EnumWndAtch function
BOOL CALLBACK EnumWndAtch(HWND hwnd, LPARAM lParam)
When I have this code in a .cpp file, I will get a compiler error:
error C2664: 'EnumWindows' : cannot convert parameter 1 from 'int (void *,long)' to 'int (__stdcall *)(void)'.
But when I rename a .cpp file to a .c file, it works. But I want to use C++ enhancements, whitch i cannot use in a .c file.
I tried it with an extern "C" command, but it still didn't work. It's sure easy, but I can't think up how to use this code in C++.
Thanks in advance.