This is something I’d expect to be quite straightforward, but after a couple of hours browsing Visual Explorer online help and ploughing through various forums, I’m still at a loss…
Basically, I’d like to be able to create a custom Windows event which sends a vector of short integers to its recipient. I’d actually like to create the event inside a Fortran DLL, but if I can find the correct API calls to do it from C++ then I should be able to figure the rest out. All of the examples I’ve been able to find so far, even for C++, use the .NET library and I cannot access this from Fortran, so it would have to be the native Windows API.
If it makes any difference, the event would subsequently be captured as a QEvent by a GUI application written using Qt.
Any ideas would be appreciated.
Use SendMessage to send a message: http://msdn.microsoft.com/en-us/library/ms644950%28VS.85%29.aspx
Then simply use a number that is not yet used by any other message. You can use RegisterWindowMessage to get a unique number: http://msdn.microsoft.com/en-us/library/ms644947%28VS.85%29.aspx If you only need to communicate in your own app, you don’t need this and you can pick any number between 0x0400 and 0x7FFF.