<?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[Bind a C++ Qt application to a file extension on win32]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">The .html file extension is bound to iexplore.exe on my win machine.<br />
If I doubleclik a html file in windows explorer, iexplore.exe will be launched.</p>
<p dir="auto">I have a Qt .exe application on win32 and I would like to bind a file extension to it:<br />
If I doubleclick a file with a specific extension, my app should be started<br />
(like the MFC functionality, see ::SetRegistryKey(...) in app::InitInstance();).</p>
<p dir="auto">Is there a Qt way to bind an extension to an application<br />
or I have to make it on the hard way and write several registry entries at the installation?</p>
<p dir="auto">Ciao</p>
]]></description><link>https://forum.qt.io/topic/5690/bind-a-c-qt-application-to-a-file-extension-on-win32</link><generator>RSS for Node</generator><lastBuildDate>Mon, 04 May 2026 22:19:38 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/5690.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 10 May 2011 15:45:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Bind a C++ Qt application to a file extension on win32 on Tue, 18 Feb 2014 21:13:04 GMT]]></title><description><![CDATA[<p dir="auto">[quote author="tanonl" date="1392757014"]I used this code but it didn't work in release mode.<br />
In the function DocumentWindow::ddeExecute, the gotten command is empty when release mode.<br />
<a class="plugin-mentions-user plugin-mentions-a" href="/user/qstring">@<bdi>QString</bdi></a> command = QString::fromWCharArray((LPCWSTR)::GlobalLock(hData)); @</p>
<p dir="auto">Is it normal?  [/quote]</p>
<p dir="auto">I got it!!!<br />
@WINBOOL b = ::UnpackDDElParam(WM_DDE_EXECUTE, message-&gt;lParam, &amp;unused, (UINT_PTR*)&amp;hData);<br />
Q_ASSERT(b);@</p>
]]></description><link>https://forum.qt.io/post/101629</link><guid isPermaLink="true">https://forum.qt.io/post/101629</guid><dc:creator><![CDATA[tanonl]]></dc:creator><pubDate>Tue, 18 Feb 2014 21:13:04 GMT</pubDate></item><item><title><![CDATA[Reply to Bind a C++ Qt application to a file extension on win32 on Tue, 18 Feb 2014 20:56:54 GMT]]></title><description><![CDATA[<p dir="auto">I used this code but it didn't work in release mode.<br />
In the function DocumentWindow::ddeExecute, the gotten command is empty when release mode.<br />
<a class="plugin-mentions-user plugin-mentions-a" href="/user/qstring">@<bdi>QString</bdi></a> command = QString::fromWCharArray((LPCWSTR)::GlobalLock(hData)); @</p>
<p dir="auto">Is it normal?</p>
]]></description><link>https://forum.qt.io/post/101628</link><guid isPermaLink="true">https://forum.qt.io/post/101628</guid><dc:creator><![CDATA[tanonl]]></dc:creator><pubDate>Tue, 18 Feb 2014 20:56:54 GMT</pubDate></item><item><title><![CDATA[Reply to Bind a C++ Qt application to a file extension on win32 on Wed, 11 May 2011 10:59:04 GMT]]></title><description><![CDATA[<p dir="auto">Hoi privet,</p>
<p dir="auto">I think they should be changed also.<br />
I already did the changes. Thanks for reporting :-)</p>
<p dir="auto">Gerolf</p>
<p dir="auto">PS: I will also update the code on gitorious the next days</p>
]]></description><link>https://forum.qt.io/post/87449</link><guid isPermaLink="true">https://forum.qt.io/post/87449</guid><dc:creator><![CDATA[giesbert]]></dc:creator><pubDate>Wed, 11 May 2011 10:59:04 GMT</pubDate></item><item><title><![CDATA[Reply to Bind a C++ Qt application to a file extension on win32 on Wed, 11 May 2011 10:30:05 GMT]]></title><description><![CDATA[<p dir="auto">Wow, I has the right to edit the article.<br />
I did it.<br />
...but...</p>
<p dir="auto">Maybe the following lines should be changed too in the same way:<br />
registerCommand("New", documentId, "-new %1", "[new("%1")]");<br />
registerCommand("Print", documentId, "-print %1", "[print("%1")]");</p>
<p dir="auto">I didn't try these lines, so I don't know, if here %1 should be changed too...?</p>
]]></description><link>https://forum.qt.io/post/87440</link><guid isPermaLink="true">https://forum.qt.io/post/87440</guid><dc:creator><![CDATA[privet]]></dc:creator><pubDate>Wed, 11 May 2011 10:30:05 GMT</pubDate></item><item><title><![CDATA[Reply to Bind a C++ Qt application to a file extension on win32 on Wed, 11 May 2011 10:22:10 GMT]]></title><description><![CDATA[<p dir="auto">Could you make that modification in the wiki article as well, please?</p>
]]></description><link>https://forum.qt.io/post/87438</link><guid isPermaLink="true">https://forum.qt.io/post/87438</guid><dc:creator><![CDATA[andre]]></dc:creator><pubDate>Wed, 11 May 2011 10:22:10 GMT</pubDate></item><item><title><![CDATA[Reply to Bind a C++ Qt application to a file extension on win32 on Wed, 11 May 2011 09:47:07 GMT]]></title><description><![CDATA[<p dir="auto">a little error: your code doesn't work correctly with paths containing spaces.<br />
The solution:<br />
registerCommand("Open", documentId, " "%1"", "[open("%1")]");<br />
(take care of the ")</p>
]]></description><link>https://forum.qt.io/post/87427</link><guid isPermaLink="true">https://forum.qt.io/post/87427</guid><dc:creator><![CDATA[privet]]></dc:creator><pubDate>Wed, 11 May 2011 09:47:07 GMT</pubDate></item><item><title><![CDATA[Reply to Bind a C++ Qt application to a file extension on win32 on Tue, 10 May 2011 17:08:41 GMT]]></title><description><![CDATA[<p dir="auto">Nice article, Gerolf!</p>
]]></description><link>https://forum.qt.io/post/87313</link><guid isPermaLink="true">https://forum.qt.io/post/87313</guid><dc:creator><![CDATA[andre]]></dc:creator><pubDate>Tue, 10 May 2011 17:08:41 GMT</pubDate></item><item><title><![CDATA[Reply to Bind a C++ Qt application to a file extension on win32 on Tue, 10 May 2011 16:44:38 GMT]]></title><description><![CDATA[<p dir="auto">cool! Thanks! That's what I was looking for! ;-)</p>
]]></description><link>https://forum.qt.io/post/87308</link><guid isPermaLink="true">https://forum.qt.io/post/87308</guid><dc:creator><![CDATA[privet]]></dc:creator><pubDate>Tue, 10 May 2011 16:44:38 GMT</pubDate></item><item><title><![CDATA[Reply to Bind a C++ Qt application to a file extension on win32 on Tue, 10 May 2011 16:30:56 GMT]]></title><description><![CDATA[<p dir="auto">You can have a look at my "wiki article":<a href="http://developer.qt.nokia.com/wiki/Assigning_a_file_type_to_an_Application_on_Windows" target="_blank" rel="noopener noreferrer nofollow ugc">http://developer.qt.nokia.com/wiki/Assigning_a_file_type_to_an_Application_on_Windows</a> , that does exactly that :-)</p>
]]></description><link>https://forum.qt.io/post/87305</link><guid isPermaLink="true">https://forum.qt.io/post/87305</guid><dc:creator><![CDATA[giesbert]]></dc:creator><pubDate>Tue, 10 May 2011 16:30:56 GMT</pubDate></item></channel></rss>