關於接收:
Receive WM_COPYDATA messages in a Qt app.
還有個中文網站:
關於發送:
用Qt在Windows下編程,如何調用Windows系統的API?
稍后會把內容補上
后來,Qt5把winEvent函數廢棄掉了,換成bool QWidget::nativeEvent(const QByteArray & eventType, void * message, long * result)函數了:
這里有個舉例子
http://blog.csdn.NET/slug302/article/details/17212521
- bool MainDialog::nativeEvent(const QByteArray &eventType, void *message, long *result)
- {
- Q_UNUSED(eventType);
- MSG* msg = reinterpret_cast<MSG*>(message);
- return winEvent(msg, result);
- }
- bool MainDialog::winEvent(MSG *message, long *result)
- {
- ...
- if (message->message != WM_NCHITTEST )
- {
- #if QT_VERSION < 0x050000
- return QDialog::winEvent(message, result);
- #else
- return QDialog::nativeEvent("", message, result);
- #endif
- }
- ...
- }
http://blog.csdn.net/lslxdx/article/details/7406861
http://blog.csdn.net/haluoluo211/article/details/45826425
http://blog.chinaunix.net/uid-13830775-id-262362.html
http://www.voidcn.com/blog/debugconsole/article/p-2948646.html
http://www.bozhiyue.com/anroid/wenzhang/2016/0427/38604.html
