DDE Messages
-
How can I register one file type with my application? I want my application to open all files that have the extension of ".tsx". I also would like to use DDE because I one instance of my program is always running and I do not want to run another instance. All I want is to send a message to the running instance. I am looking forward to hearing from you guys Mustafa Demirhan http://www.macroangel.com Sonork ID 100.9935:zoltrix
They say I'm lazy but it takes all my time
-
How can I register one file type with my application? I want my application to open all files that have the extension of ".tsx". I also would like to use DDE because I one instance of my program is always running and I do not want to run another instance. All I want is to send a message to the running instance. I am looking forward to hearing from you guys Mustafa Demirhan http://www.macroangel.com Sonork ID 100.9935:zoltrix
They say I'm lazy but it takes all my time
More than one hundred native Windows apps are using DDE file association already. So I guess it's not cumbersome to find them. First thing to do is in Windows Explorer file association, check the use DDE checkbox, and type Open("%1") as DDE message, and system as Topic. This in itself in almost enough (depending then on how you handle default verbs in your apps).
sometimes it helps to look at the IL generated code a MS guy on develop.com "answering" .NET issues
-
More than one hundred native Windows apps are using DDE file association already. So I guess it's not cumbersome to find them. First thing to do is in Windows Explorer file association, check the use DDE checkbox, and type Open("%1") as DDE message, and system as Topic. This in itself in almost enough (depending then on how you handle default verbs in your apps).
sometimes it helps to look at the IL generated code a MS guy on develop.com "answering" .NET issues
In fact I did that. But when I do that, CWinApp tries to open the file on its own. But what I want is to do different things but I could not figure out how to. I overrided CWinApp::OnDDECommand () but this method is never called :( Mustafa Demirhan http://www.macroangel.com Sonork ID 100.9935:zoltrix
They say I'm lazy but it takes all my time
-
In fact I did that. But when I do that, CWinApp tries to open the file on its own. But what I want is to do different things but I could not figure out how to. I overrided CWinApp::OnDDECommand () but this method is never called :( Mustafa Demirhan http://www.macroangel.com Sonork ID 100.9935:zoltrix
They say I'm lazy but it takes all my time
You must also have this in your CWinApp implementation :
// enable file manager drag/drop and DDE Execute open
EnableShellOpen();
RegisterShellFileTypes();
// ...And you have MSDN articles [^]about it. From a former app I somewhat remember, I also had a WIN32 message loop scrutening for WM_DDE_xxx messages. But this advanced advanced DDE use to transfer data using the clipboard.
sometimes it helps to look at the IL generated code a MS guy on develop.com "answering" .NET issues
-
You must also have this in your CWinApp implementation :
// enable file manager drag/drop and DDE Execute open
EnableShellOpen();
RegisterShellFileTypes();
// ...And you have MSDN articles [^]about it. From a former app I somewhat remember, I also had a WIN32 message loop scrutening for WM_DDE_xxx messages. But this advanced advanced DDE use to transfer data using the clipboard.
sometimes it helps to look at the IL generated code a MS guy on develop.com "answering" .NET issues
Thanks a lot. This is a good start for me. But I still get error messages. I added these two lines, but
OnDDECommand
is never called. All I get is a stupid error message: "Windows cannot find 'c:\temp\yourfile.tsx'. Make sure that you typed the name correctly, and then try again. To search a file, .....". The error message directly comes from Windows Explorer and then my program is executed. But it never callsOnDDECommand
. I don't know what's going on there :confused: Mustafa Demirhan http://www.macroangel.com Sonork ID 100.9935:zoltrixThey say I'm lazy but it takes all my time
-
You must also have this in your CWinApp implementation :
// enable file manager drag/drop and DDE Execute open
EnableShellOpen();
RegisterShellFileTypes();
// ...And you have MSDN articles [^]about it. From a former app I somewhat remember, I also had a WIN32 message loop scrutening for WM_DDE_xxx messages. But this advanced advanced DDE use to transfer data using the clipboard.
sometimes it helps to look at the IL generated code a MS guy on develop.com "answering" .NET issues
Upps. One correction: First my program is started and then the error message comes directly from Windows Explorer :omg: Mustafa Demirhan http://www.macroangel.com Sonork ID 100.9935:zoltrix
They say I'm lazy but it takes all my time
-
You must also have this in your CWinApp implementation :
// enable file manager drag/drop and DDE Execute open
EnableShellOpen();
RegisterShellFileTypes();
// ...And you have MSDN articles [^]about it. From a former app I somewhat remember, I also had a WIN32 message loop scrutening for WM_DDE_xxx messages. But this advanced advanced DDE use to transfer data using the clipboard.
sometimes it helps to look at the IL generated code a MS guy on develop.com "answering" .NET issues
I found my mistake: As the topic in Windows explorer I forgot to write "system". After I made the correction, everthing works great! Mustafa Demirhan http://www.macroangel.com Sonork ID 100.9935:zoltrix
They say I'm lazy but it takes all my time