<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Sending messages between a Qt application and an MFC application]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I have two applications one is MFC(and I only have the executable ,but know that it is sending messages when some buttons are pushed) and the other is done using Qt.The one in MFC using something like this to send messages:<br />
@</p>
<p dir="auto">CString strDataToSend = _T( "Hello" );<br />
HWND hWndReceived;<br />
COPYDATASTRUCT cpd;<br />
cpd.dwData =  0;<br />
cpd.cbData  =  strDataToSend.GetLength();<br />
cpd.lpData    =  (void*)strDataToSend.GetBuffer(cpd.cbData);<br />
SendMessage( hWndReceived, WM_COPYDATA, 0, (LPARAM) &amp; cpd );<br />
strDataToSend.ReleaseBuffer();</p>
<p dir="auto">@</p>
<p dir="auto">I need to receive those messages in my Qt application and take some appropriate actions.<br />
Is there a way Qt makes this easy to implement?<br />
Thanks.</p>
]]></description><link>https://forum.qt.io/topic/33126/sending-messages-between-a-qt-application-and-an-mfc-application</link><generator>RSS for Node</generator><lastBuildDate>Mon, 10 Aug 2026 23:32:46 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/33126.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 16 Oct 2013 08:57:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Sending messages between a Qt application and an MFC application on Thu, 17 Oct 2013 02:57:42 GMT]]></title><description><![CDATA[<p dir="auto">Thanks guys,<br />
I found that sockets are an easy way to get this done quickly as the project is tight on time.</p>
<p dir="auto">Thanks again.</p>
]]></description><link>https://forum.qt.io/post/199334</link><guid isPermaLink="true">https://forum.qt.io/post/199334</guid><dc:creator><![CDATA[musimbate]]></dc:creator><pubDate>Thu, 17 Oct 2013 02:57:42 GMT</pubDate></item><item><title><![CDATA[Reply to Sending messages between a Qt application and an MFC application on Wed, 16 Oct 2013 12:44:32 GMT]]></title><description><![CDATA[<p dir="auto">HWND hWndReceived must be a valid handle of an existing window object</p>
<p dir="auto">try to find the qt window with "FindWindow":<a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms633499(v=vs.85).aspx" target="_blank" rel="noopener noreferrer nofollow ugc">http://msdn.microsoft.com/en-us/library/windows/desktop/ms633499(v=vs.85).aspx</a> ... you can use Spy++ to look at window class name to be found</p>
<p dir="auto">anyway if you have access to the code of both apps you should consider other way for IPC</p>
]]></description><link>https://forum.qt.io/post/199272</link><guid isPermaLink="true">https://forum.qt.io/post/199272</guid><dc:creator><![CDATA[NicuPopescu]]></dc:creator><pubDate>Wed, 16 Oct 2013 12:44:32 GMT</pubDate></item><item><title><![CDATA[Reply to Sending messages between a Qt application and an MFC application on Wed, 16 Oct 2013 11:07:20 GMT]]></title><description><![CDATA[<p dir="auto">What are you trying to do? If you want to communicate between applications you might need to look at some IPC(Inter process communication) methods. try this link "<a href="http://qt-project.org/doc/qt-5.0/qtdoc/ipc.html" target="_blank" rel="noopener noreferrer nofollow ugc">http://qt-project.org/doc/qt-5.0/qtdoc/ipc.html</a>":<a href="http://qt-project.org/doc/qt-5.0/qtdoc/ipc.html" target="_blank" rel="noopener noreferrer nofollow ugc">http://qt-project.org/doc/qt-5.0/qtdoc/ipc.html</a></p>
]]></description><link>https://forum.qt.io/post/199259</link><guid isPermaLink="true">https://forum.qt.io/post/199259</guid><dc:creator><![CDATA[dasun]]></dc:creator><pubDate>Wed, 16 Oct 2013 11:07:20 GMT</pubDate></item></channel></rss>