M
mkarja
Hi,
I've been struggling with this error for a while and I don't
know what's wrong. Any help would be appreciated.
Here's code snippets and the error message.
----------------------------
LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam,
LPARAM lParam, LPARAM lParamClient, HWND _hClient);
----------------------------
class WindowClass: public WNDCLASSEX
{
public:
WindowClass (WNDPROC WndProc, char const * className,
HINSTANCE hInst, const char * szChild)
{
....
)
};
----------------------------
// This is the line that gives the error
WindowClass winClass (WndProc, className, hInst, szChild);
----------------------------
error C2664: '__thiscall WindowClass::WindowClass(long (__stdcall *)
(struct HWND__ *,unsigned int,unsigned int,long),const char *,
struct HINSTANCE__ *,const char *)' : cannot convert parameter 1 from '
long (struct HWND__ *,unsigned int,unsigned int,long,struct HWND__ *)'
to 'long (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long)'
None of the functions with this name in scope match the target type
I've been struggling with this error for a while and I don't
know what's wrong. Any help would be appreciated.
Here's code snippets and the error message.
----------------------------
LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam,
LPARAM lParam, LPARAM lParamClient, HWND _hClient);
----------------------------
class WindowClass: public WNDCLASSEX
{
public:
WindowClass (WNDPROC WndProc, char const * className,
HINSTANCE hInst, const char * szChild)
{
....
)
};
----------------------------
// This is the line that gives the error
WindowClass winClass (WndProc, className, hInst, szChild);
----------------------------
error C2664: '__thiscall WindowClass::WindowClass(long (__stdcall *)
(struct HWND__ *,unsigned int,unsigned int,long),const char *,
struct HINSTANCE__ *,const char *)' : cannot convert parameter 1 from '
long (struct HWND__ *,unsigned int,unsigned int,long,struct HWND__ *)'
to 'long (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long)'
None of the functions with this name in scope match the target type