|
From: robert on 14 May 2008 04:06 hi all, I need that my application can automatically open some registerd type of file when i double-click this type of file in windows explorer. In a simple MDI-style application, only the following things need to be done when the app object initializes: EnableShellOpen(); RegisterShellFileTypes(FALSE); It seems everything is ok. But my actual application is much more complicated than this sample. When i do like that, one message box, which shoule be from the windows explorer, always appears and say that windows connot find this file.Later, i found one CWinThread thread, different with main thread, took effect on that! I suspect the WM_DDE_INITIATE message sent by shell window wasn't received by the main window of my application. The key problem is that if i let the thread run before the main window is created, the problem will occur definitely. Otherwise, no effect. Certainly, if the thread doesn't run, it's ok too. We know that after the thread of CWinThread-style starts, it will enter one message loop by calling GetMessage. Is there anything else that affects the receiving of WM_DDE_INITIATE? Any suggestions will be appreciated. Thanks Robert
|
Pages: 1 Prev: writing multiple files vs single file using fwrite/fopen Next: Virtual Folder Shell extension |