I am converting a program from C to C++. I have the compiler set to use the __fastcall calling convention by default.
I used to have a declaration line as follows:
INT32 PASCAL graph_window_handler(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Later I have:
wndclass.lpfnWndProc = graph_window_handler;
This all compiled and worked under C. But under C++ I get all sorts of complaints form the compiler about the second line of code. I guess I need to change the original declaration to something involving WNDPROC, perhaps with a _cdecl thrown in? With or without the INT32? but it seems that every variation I try still gets complained about. What should the declaration look like such that the second line does not get complained about? - cheers.