Re: Compiler error C2664
From: David Lindauer (camille_at_bluegrass.net)
Date: 02/06/05
- Next message: Xpyder: "Accessing member data from another class with pointers"
- Previous message: wittempj_at_hotmail.com: "Re: Inserting a char into a string."
- In reply to: mkarja: "Compiler error C2664"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 06 Feb 2005 22:28:21 GMT
mkarja wrote:
> 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 hope you understand my snippets. I'll try to explain more if needed.
> I'm using Visual C++ 6.0 for coding.
WndProc isn 't declared with the right number of arguments...
David
- Next message: Xpyder: "Accessing member data from another class with pointers"
- Previous message: wittempj_at_hotmail.com: "Re: Inserting a char into a string."
- In reply to: mkarja: "Compiler error C2664"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|