How to correctly WM_COPYDATA
-
Hi, I'm struggling with a problem. I want to catch a 'WM_COPYDATA' event that occurs in a C# application. I send a data from a C++ application. The bridge is correctly done I think. So, sometimes it works, usually when my C# application is active. But most of the time, it doesn't work, because when trying to catch the appropriate WM_COPYDATA message in WndProc overrided method of my C# application, the program stays catching a couple of other messages like: WM_WINDOWPOSCHANGED, WM_ACTIVATEAPP, WM_NCACTIVATE, WM_ACTIVATE and so on. Doing so, it almost never catch the WM_COPYDATA message that I sent from my C++ application. Can you help me please ? Thanks. P.S.: I catch messages in my C# application like this: protected override void WndProc(ref Message m) { string g = m.ToString(); if (m.Msg == WM_COPYDATA) { // instructions. } }
p.f. Goudjo-Ako Bringing our energy together !
-
Hi, I'm struggling with a problem. I want to catch a 'WM_COPYDATA' event that occurs in a C# application. I send a data from a C++ application. The bridge is correctly done I think. So, sometimes it works, usually when my C# application is active. But most of the time, it doesn't work, because when trying to catch the appropriate WM_COPYDATA message in WndProc overrided method of my C# application, the program stays catching a couple of other messages like: WM_WINDOWPOSCHANGED, WM_ACTIVATEAPP, WM_NCACTIVATE, WM_ACTIVATE and so on. Doing so, it almost never catch the WM_COPYDATA message that I sent from my C++ application. Can you help me please ? Thanks. P.S.: I catch messages in my C# application like this: protected override void WndProc(ref Message m) { string g = m.ToString(); if (m.Msg == WM_COPYDATA) { // instructions. } }
p.f. Goudjo-Ako Bringing our energy together !
You should ask this on the C# board[^] Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
-
You should ask this on the C# board[^] Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
Thanks Mark, I dit it.
p.f. Goudjo-Ako Bringing our energy together !