Can C# register my own windows message Like VC++ do?
-
in VC++, i can register my own windows message and map it.Can it be done in C# ? for example, processing WndProc() function:
protected ovrerride WndProc(ref Message Msg) { switch (Msg.MsgID) { case MY_OWN_MSG: dosomething(); break; } base.WndProc(ref Msg); }
How to register "MY_OWN_MSG" so that my other C++ application could use it ? -
in VC++, i can register my own windows message and map it.Can it be done in C# ? for example, processing WndProc() function:
protected ovrerride WndProc(ref Message Msg) { switch (Msg.MsgID) { case MY_OWN_MSG: dosomething(); break; } base.WndProc(ref Msg); }
How to register "MY_OWN_MSG" so that my other C++ application could use it ?I never coded C++ so correct me if i didn't understand exactly what u meant. From the looks of that code you may want to create a class library and compile it into a DLL which then you can use later in other applications by calling the DLL with the 'using' Keyword and then reffering to the MY_OWN_MSG in that DLL.
-
I never coded C++ so correct me if i didn't understand exactly what u meant. From the looks of that code you may want to create a class library and compile it into a DLL which then you can use later in other applications by calling the DLL with the 'using' Keyword and then reffering to the MY_OWN_MSG in that DLL.
i am writting a C++ DLL in which i want to send my own windows msg to other app. Like this: // C++ Code #define MY_OWN_MSG value PostMessage(hWnd,MY_OWN_MSG,0,0); //////////////////////////////// the MY_OWN_MSG must be registered to a windows message. How to Register a windows message in C# ?