PostMessage() inside MidiInProc()
-
If I call
PostMessage()
insideMidiInProc()
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 likePostMessage()
". Any help would be greatly appreciable!! Best Regards, Suman -
If I call
PostMessage()
insideMidiInProc()
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 likePostMessage()
". Any help would be greatly appreciable!! Best Regards, Sumanthis 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
-
If I call
PostMessage()
insideMidiInProc()
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 likePostMessage()
". Any help would be greatly appreciable!! Best Regards, SumanHi 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
-
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
-
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