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. PostMessage() inside MidiInProc()

PostMessage() inside MidiInProc()

Scheduled Pinned Locked Moved C / C++ / MFC
help
5 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.
  • R Offline
    R Offline
    rp_suman
    wrote on last edited by
    #1

    If I call PostMessage() inside MidiInProc() function, there is an error saying:

    error C2352: 'CWnd::PostMessageA' : illegal call of non-static member function

    But the documentation for MidiInProc() says "Applications should not call any system-defined functions except for some functions like PostMessage()". Any help would be greatly appreciable!! Best Regards, Suman

    S T 2 Replies Last reply
    0
    • R rp_suman

      If I call PostMessage() inside MidiInProc() function, there is an error saying:

      error C2352: 'CWnd::PostMessageA' : illegal call of non-static member function

      But the documentation for MidiInProc() says "Applications should not call any system-defined functions except for some functions like PostMessage()". Any help would be greatly appreciable!! Best Regards, Suman

      S Offline
      S Offline
      Shouvik Das
      wrote on last edited by
      #2

      this error C2352 occurs if A static member function called a nonstatic member function. Or, a nonstatic member function was called from outside the class as a static function. The following sample generates C2352: // C2352a.cpp class CMyClass { public: static void func1(); void func2(); static void func3() { func1(); // OK, calls static func1 func2(); // C2352, calls nonstatic func2 } }; int main() { } The following sample generates C2352: // C2352b.cpp class MyClass { public: void MyFunc() { } static void MyFunc2() { } }; int main() { MyClass::MyFunc(); // C2352 // try the following line instead // MyClass::MyFunc2(); } I hope you inderstand what you need to change...I must confess I gave you details from MSDN Library only :)


      There are only two kinds of people who are really fascinating-people who know absolutely everything, and people who know absolutely nothing. Oscar Wilde (1854-1900) Regards... Shouvik

      R 1 Reply Last reply
      0
      • R rp_suman

        If I call PostMessage() inside MidiInProc() function, there is an error saying:

        error C2352: 'CWnd::PostMessageA' : illegal call of non-static member function

        But the documentation for MidiInProc() says "Applications should not call any system-defined functions except for some functions like PostMessage()". Any help would be greatly appreciable!! Best Regards, Suman

        T Offline
        T Offline
        tanvon malik
        wrote on last edited by
        #3

        Hi Documentation says PostMessage() API; not the CWnd member function;

        tanvon malik http://www.tanvon.com http://tanvon.wordpress.com http://groups.yahoo.com/group/tanvon http://www.codeproject.com/script/articles/list_articles.asp?userid=1638055

        R 1 Reply Last reply
        0
        • T tanvon malik

          Hi Documentation says PostMessage() API; not the CWnd member function;

          tanvon malik http://www.tanvon.com http://tanvon.wordpress.com http://groups.yahoo.com/group/tanvon http://www.codeproject.com/script/articles/list_articles.asp?userid=1638055

          R Offline
          R Offline
          rp_suman
          wrote on last edited by
          #4

          If you check the help for "MidiInProc" in Help Menu --> Index of VC .Net 2003 IDE, you can see the same documentation I saw under "Remarks". Thanks for the help!! Best Regards, Suman

          1 Reply Last reply
          0
          • S Shouvik Das

            this error C2352 occurs if A static member function called a nonstatic member function. Or, a nonstatic member function was called from outside the class as a static function. The following sample generates C2352: // C2352a.cpp class CMyClass { public: static void func1(); void func2(); static void func3() { func1(); // OK, calls static func1 func2(); // C2352, calls nonstatic func2 } }; int main() { } The following sample generates C2352: // C2352b.cpp class MyClass { public: void MyFunc() { } static void MyFunc2() { } }; int main() { MyClass::MyFunc(); // C2352 // try the following line instead // MyClass::MyFunc2(); } I hope you inderstand what you need to change...I must confess I gave you details from MSDN Library only :)


            There are only two kinds of people who are really fascinating-people who know absolutely everything, and people who know absolutely nothing. Oscar Wilde (1854-1900) Regards... Shouvik

            R Offline
            R Offline
            rp_suman
            wrote on last edited by
            #5

            I want to call a function directly or by posting a user defined message when particular message MM_MIM_LONGDATA comes in MidiInProc(). I will check your suggestion. Thanks for your help!! Best Regards, Suman

            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