Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. About CWnd Error

About CWnd Error

Scheduled Pinned Locked Moved C / C++ / MFC
help
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    siddharthsan
    wrote on last edited by
    #1

    Hi, I created dll and trying to export a function which in turn calls InvokeHelper function,But my dll is created using win32 dynamic library it is not recognizing InvokeHelper,so i included the macros, _AFX_NO_OCC_SUPPORT and AFX_CDECL.Now it is showing error as, error C2061: syntax error : identifier 'CWnd'.What i have to do.Please help me...:(( Siddharth

    P M 2 Replies Last reply
    0
    • S siddharthsan

      Hi, I created dll and trying to export a function which in turn calls InvokeHelper function,But my dll is created using win32 dynamic library it is not recognizing InvokeHelper,so i included the macros, _AFX_NO_OCC_SUPPORT and AFX_CDECL.Now it is showing error as, error C2061: syntax error : identifier 'CWnd'.What i have to do.Please help me...:(( Siddharth

      P Offline
      P Offline
      prasad_som
      wrote on last edited by
      #2

      Include afxwin.h, remove statement #include <windows.h> , if there is any.

      siddharthsan wrote:

      _AFX_NO_OCC_SUPPORT and AFX_CDECL

      I wonder, why you needed to use this?

      Prasad Notifier using ATL | Operator new[],delete[][^]

      S 1 Reply Last reply
      0
      • P prasad_som

        Include afxwin.h, remove statement #include <windows.h> , if there is any.

        siddharthsan wrote:

        _AFX_NO_OCC_SUPPORT and AFX_CDECL

        I wonder, why you needed to use this?

        Prasad Notifier using ATL | Operator new[],delete[][^]

        S Offline
        S Offline
        siddharthsan
        wrote on last edited by
        #3

        If I include afxwin.h it showing the following error, fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include What i have to do... Siddharth

        P 1 Reply Last reply
        0
        • S siddharthsan

          If I include afxwin.h it showing the following error, fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include What i have to do... Siddharth

          P Offline
          P Offline
          prasad_som
          wrote on last edited by
          #4

          Remove line #include <windows>, if there is any.

          Prasad Notifier using ATL | Operator new[],delete[][^]

          S 1 Reply Last reply
          0
          • P prasad_som

            Remove line #include <windows>, if there is any.

            Prasad Notifier using ATL | Operator new[],delete[][^]

            S Offline
            S Offline
            siddharthsan
            wrote on last edited by
            #5

            I removed windows.h from stdafx.h and included afxwin.h in my header file.Now it is not recognizing the InvokeHelper and it's parameters.Giving error as error C2065: 'InvokeHelper' : undeclared identifier error C2065: 'DISPATCH_METHOD' : undeclared identifier error C2065: 'VT_EMPTY' : undeclared identifier What would be the problem... Siddahrth

            1 Reply Last reply
            0
            • S siddharthsan

              Hi, I created dll and trying to export a function which in turn calls InvokeHelper function,But my dll is created using win32 dynamic library it is not recognizing InvokeHelper,so i included the macros, _AFX_NO_OCC_SUPPORT and AFX_CDECL.Now it is showing error as, error C2061: syntax error : identifier 'CWnd'.What i have to do.Please help me...:(( Siddharth

              M Offline
              M Offline
              Mark Salsbery
              wrote on last edited by
              #6

              How do you expect to use an OCC_SUPPORT method by using the _AFX_NO_OCC_SUPPORT macro to ommit OCC support in the MFC code?? Get rid of that macro! *EDIT* You probably shouldn't be messing with AFX_CDECL either unless you know what you're doing. Look at the declaration for CWnd::InvokeHelper()...

              #ifndef _AFX_NO_OCC_SUPPORT
              // OLE control wrapper functions
              COleControlSite* GetOleControlSite(UINT idControl) const;
              void AFX_CDECL InvokeHelper(DISPID dwDispID, WORD wFlags,
              ...

              See why it won't work with that macro? :) Mark

              "If you can dodge a wrench, you can dodge a ball."

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups