CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 1999
    Posts
    33

    static_cast error in VS.Net 2003

    Well, much thanks to everyone who has helped me with the port to VS.Net 2003. I have run across another interesting error when compiling. This application compiles under VC6.

    I get the following error:
    error C2440: 'static_cast' : cannot convert from 'void (__thiscall CViewZoom::* )(void)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'

    the line of code it barks at is:

    ON_MESSAGE(WM_NCDESTROY, OnNcDestroy)

    What is wrong with this?

  2. #2
    Join Date
    Jul 2002
    Location
    St. Louis, MO
    Posts
    484
    PHP Code:
     // I think that it should be
    ON_WM_NCDESTROY()

    //as opposted to
    ON_MESSAGE(WM_NCDESTROYOnNcDestroy

  3. #3
    Join Date
    Aug 1999
    Posts
    33

    that worked!

    thanx that made it compile!

    BTW, when did it change, and how was I supposed to know that? I guess I am porting a little late in the game.....

  4. #4
    Join Date
    Jul 2002
    Location
    St. Louis, MO
    Posts
    484
    It looks like it changed in .NET 2002 (that's what I have)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured