MDI App will no longer open file by double clicking associated filetype

OK, I had an app which was originally based upon an MDI app.  It has been
'modded' to add various functionalities with code from www.codeguru.com and
www.codeproject.com.

Unfortunately, I just recently noticed that the ability to double click on
the associated filetype (from a folder, desktop, etc) now no longer works.
Instead, I get a messagebox:
Title: (pathname of file)
Message: Windows cannot find '(pathname of file).'  Make sure you typed the
name correctly, and then try again.  To search for a file, click the Start
button, and then click Search.

This is on Windows XP.  Any ideas what might cause this?
I've tried unregistering the filetype and reassociating, but that didn't
seem to do anything.  Any other ideas?

Thanks!

-- 
Adam Clauss
cabadam@tamu.edu


0
cabadam (25)
10/4/2003 3:10:57 AM
vc.mfc 33608 articles. 0 followers. Follow

7 Replies
861 Views

Similar Articles

[PageSpeed] 29

>OK, I had an app which was originally based upon an MDI app.  It has been
>'modded' to add various functionalities with code from www.codeguru.com and
>www.codeproject.com.
>
>Unfortunately, I just recently noticed that the ability to double click on
>the associated filetype (from a folder, desktop, etc) now no longer works.

Adam,

Is your application and MFC MDI app (presumably it is since you're
posting here), and have you rebuilt it with VS7.1?

If you have, that's likely to be the problem. If you use Google groups
and search these newsgroups for references to OnDDEExecute, I think
you'll find the solution (duplicate the MFC code and add a missing
line of code).

Dave
-- 
MVP VC++ FAQ: http://www.mvps.org/vcfaq
0
davidl (422)
10/4/2003 8:24:59 AM
Actually no - just using VS7 (2002).  I HAVE 2003, but I was waiting until
some more of the quirks get worked out/solved before I undertake any
projects with it.  I'll take a look at the OnDDEExecute though, maybe it'll
point me in the right direction.

-- 
Adam Clauss
cabadam@tamu.edu
"David Lowndes" <davidl@mvps.org> wrote in message
news:oq0tnv067uukbjagnlmr6qci02qs5bh5i4@4ax.com...
> >OK, I had an app which was originally based upon an MDI app.  It has been
> >'modded' to add various functionalities with code from www.codeguru.com
and
> >www.codeproject.com.
> >
> >Unfortunately, I just recently noticed that the ability to double click
on
> >the associated filetype (from a folder, desktop, etc) now no longer
works.
>
> Adam,
>
> Is your application and MFC MDI app (presumably it is since you're
> posting here), and have you rebuilt it with VS7.1?
>
> If you have, that's likely to be the problem. If you use Google groups
> and search these newsgroups for references to OnDDEExecute, I think
> you'll find the solution (duplicate the MFC code and add a missing
> line of code).
>
> Dave
> -- 
> MVP VC++ FAQ: http://www.mvps.org/vcfaq


0
cabadam (25)
10/4/2003 3:12:48 PM
>Actually no - just using VS7 (2002).  I HAVE 2003, but I was waiting until
>some more of the quirks get worked out/solved before I undertake any
>projects with it.  I'll take a look at the OnDDEExecute though, maybe it'll
>point me in the right direction.

Let us know what the problem is when you find it.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
0
davidl (422)
10/6/2003 10:29:21 AM
OK, near as I can tell, the DDE is never getting sent to my app.

In OnInitInstance, I threw in a messagebox for the commandlineinfo.  I
looked at the shell command member.  It is correctly being marked as
FileDDE.  However, my messagebox placed in my CWinApp::OnDDECommand never
gets called.

So, what I think is happening:
1)  I double click on the file in explorer.
2)  Windows executes my application with the dde parameter, indicating that
it will send a dde command later to open a file.
3)  Then (and apparently in a separate thread) Windows (NOT my app) is
displaying the messagebox saying that the file cannot be found (see original
post for exact message).
4)  At almost the same time as step 3, my app starts up as if I had started
it normally (as if not opening a file) with the exception that the current
directory is set to the location of the file.

At this point I'm pretty much lost.  I'm not overly familiar with which the
process windows uses to start an app and open a file.  Any suggestions?

-- 
Adam Clauss
cabadam@tamu.edu
"David Lowndes" <davidl@mvps.org> wrote in message
news:7vg2ovcmrvl2jgrhpuhnnguo5shhfb4unq@4ax.com...
> >Actually no - just using VS7 (2002).  I HAVE 2003, but I was waiting
until
> >some more of the quirks get worked out/solved before I undertake any
> >projects with it.  I'll take a look at the OnDDEExecute though, maybe
it'll
> >point me in the right direction.
>
> Let us know what the problem is when you find it.
>
> Dave
> --
> MVP VC++ FAQ: http://www.mvps.org/vcfaq


0
cabadam (25)
10/6/2003 10:36:12 PM
>OK, near as I can tell, the DDE is never getting sent to my app.

Is the document association information correct in the registry?

>...
>At this point I'm pretty much lost.  I'm not overly familiar with which the
>process windows uses to start an app and open a file.  Any suggestions?

The shell (Explorer) basically just calls the ShellExecute API on your
file name - I have no detail about what exactly it does.

Dave
-- 
MVP VC++ FAQ: http://www.mvps.org/vcfaq
0
davidl (422)
10/7/2003 6:36:55 AM
Yes - it all looks correct (I think...).  And just to be sure, in
InitInstance (after setting up the doctemplates) I added a call to
UnregisterShellFileTypes prior to EnableShellOpen/RegisterShellFileTypes so
that I could be sure it was correct.

-- 
Adam Clauss
cabadam@tamu.edu
"David Lowndes" <davidl@mvps.org> wrote in message
news:vgn4ovgbqvu6ugu0gsonjr1j34rlub7r4o@4ax.com...
> >OK, near as I can tell, the DDE is never getting sent to my app.
>
> Is the document association information correct in the registry?
>
> >...
> >At this point I'm pretty much lost.  I'm not overly familiar with which
the
> >process windows uses to start an app and open a file.  Any suggestions?
>
> The shell (Explorer) basically just calls the ShellExecute API on your
> file name - I have no detail about what exactly it does.
>
> Dave
> -- 
> MVP VC++ FAQ: http://www.mvps.org/vcfaq


0
cabadam (25)
10/7/2003 3:27:51 PM
>Yes - it all looks correct (I think...).  And just to be sure, in
>InitInstance (after setting up the doctemplates) I added a call to
>UnregisterShellFileTypes prior to EnableShellOpen/RegisterShellFileTypes so
>that I could be sure it was correct.

All I can suggest at this stage is to create a new project and see if
that works and then see if you can identify differences with your
existing project.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
0
davidl (422)
10/7/2003 4:18:56 PM
Reply:

Similar Artilces:

cannot open a file
1...when i try to open file i get message,cannot open" need to know which programme created it" I go to the web as directed where I find Publisher (iam sure that was the programme used) what should i do next? 2.... if I do not know which programme created a file, how do I find out which one did? thanks Look at the extension of the file. If it says .pub then it was created by Publisher. If you don't have extensions turned on, right click the file, properties, it should show the extension. If you always want to see file extensions, in Windows Explorer, folder options, view ...

Outlook freezes when I open a message
Outlook 2k3 opens fine and retrieves messages sort of fine. For my IMAP account it has started only downloading headers not messages, but selecting and requesting download gets around that. The major problem is that it freezes when I open a message in the inbox, any message. This just started today. I've tried a number of fixes that haven't worked. Hopefully someone out there has a workaround. 1. I closed outlook and reopened it. It reopened but I couldn't open messages, or at most one message opened. Send and Receive works. 2. I used the detect and repair option under...

No Office programs will launch anymore. Why?
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Power PC I posted this same message in Powerpoint because it stopped launching. I now realize it is ALL office programs that have stopped launching after having run fine for 4 months. Every time I try to launch a program, it crashes, giving me the crash error message and the option to relaunch. I keep relaunching but they keep crashing. I tried reset and relaunch but they still crash. here is what the crash summary says: Process: Microsoft Word [272] Path: /Applications/Microsoft Word.app/Contents/MacOS/Microsoft Word Identif...

MDI appliccation problem
Hi, I am working on an MDI application. I am haveing a strange problemin this application. I have 2 dialogs in the main MDI application (Common settings & standard about app dialog). I have my Doc/View/Frame coming from various DLLs. When I start my application, and use the dialogs (common dialog OR About App) it works fine (i.e. dialog s are displayed properly with proper filled values). Now I create a new instance of a Document by clicking New in Fuile Menu or Ctrl+N (I have 2 document types available right now), and then close the document (by Close in File menu or Ctrl+F4). After ...

Customize Outlook Doesn't Open
The Customize Outlook button does not open. Any suggestions? I am using Outlook 2000. This is a well-known bug, addressed in the following article in Microsoft's Knowledge Base: http://support.microsoft.com/?kbid=820575 William "ck" wrote > The Customize Outlook button does not open. > Any suggestions? I am using Outlook 2000. ...

skining an app like WMP 11
hi there i am writing a vc++ 6 app which manages audio i would like to skin parts of it to look like Windows Media Player 11 (that sleek black Vista look) - how do i go about it? do i use directx? or what? note, i am *not* using WMP to play audio, so its not about writing a WMP skin, just a skin that looks like wmp11 cheers bhu ...

Retrieving a sent email before recepient opens it
How do I retrieve an email I sent in Outlook 2000 before the recepient opens it ? Hit the "Do do send" before "I decide tomorrow" button. "dan" <anonymous@discussions.microsoft.com> wrote: >How do I retrieve an email I sent in Outlook 2000 before >the recepient opens it ? Unless you are using an Exchange server, there is no message recall. With Exchange server, your chances are better. However, the best way to retrieve a message is to not send it until you have reread it and decide that this should be sent. --� Milly Staples [MVP - Outlook...

MDI within MDI?...
Hi All, I have an MDI app where I want each child window to in turn host another MDI parent, allowing a managed frame of children for each top-level MDI child. The purpose is a "workspace" driven UI where the top-level children are maximised and displayed as tabs only, but each has to be able to host further framed windows within it. I am not an MFC expert on MDI/SDI, nor on the underlying API requirements. I have been able to create primitive child frame in the top-level view's OnInitialUpdate, specifying the view as the parent, which does bounds clipping OK, however I'm l...

Outlook won't open #12
When I try to open Outlook 2007, it won't open and I get the error message "Borland database engine not installed. Can't load Corel address book service provider" I'm not using Corel Address Book. Does anyone have any suggestios on how to remedy this problem? Did it work before? Try opening useing the safe switch; Run type: outlook.exe \safe enter "Mike M" <MikeM@discussions.microsoft.com> wrote in message news:11DCB97D-1EFC-4AFE-BEF9-400F030BD9D1@microsoft.com... > When I try to open Outlook 2007, it won't open and I get the error message >...

Combobox Value Will Not Change
Not certain how to describe this one. A combox is placed on a form. The form is called from a continuos list via a mouse down event. If Button = acRightButton Then DoCmd.OpenForm "frmTask", acNormal End If The form, frmTask, has absolutely no code behind it. It has a combobox with a row source type of "value list" and a row source of ""Complete";"Complete with a Problem";"Abandoned"". The form, frmTask, is set to allow edits, allow additions and allow deletions all = yes. The value in combobox cannot ...

I can't click on new mail message.
Hi, I am using Outlook 2007 and I can't click on the following buttons as they seem to be disabled. The writing on the buttons is a dull grey rather than black. The buttons include: New, Reply, Reply to All, Forward, The Flag button. There are more that are disabled but the list will bore you. I have checked that I am working online and have tested my account setting and the test email came through. I can receive emails no worries but can't obviously do anything about them once they are in my inbox! I am sure there is an easy explaination but I am a novice at this so ple...

How can I open an Excel Workbook from Outlook macro and activate that workbook?
How can I open an Excel Workbook from an Outlook macro and activate that workbook? The goal is to enter a 4 digit number in an outlook userform (txtbox1), press a search button and the outlook macro should open an excel workbook (or if excel is already running, activate excel and open the specific workbook in a specific folder if it's not already opened, if the workbook is already opened, activate that workbook). Once the right workbook has been activated, go to sheet1 and search only from cell C11 to the last occupied cell in column C, if the number is found, retrieve the corresponding d...

how can i open a publisher 95 doc using publisher 98?
i have an old document that was done in pub95 and now need to retrieve that info but when i use my pub98 to open the doc, it advised it cant open older versions of publisher. is there any way i can open this pub 95 doc and retrieve the text? thanks guys. While waiting for decisions from his 6 university choices, Ed sees a message from johnny b <johnny b@discussions.microsoft.com>. On it is written: > i have an old document that was done in pub95 and now need to > retrieve that info but when i use my pub98 to open the doc, it > advised it cant open older versions of publishe...

Creating Document in MDI app
Hi, In my application I wish to be able to export certain data to another file. In one of the functions in my view I need to create a new document, call some functions on it then save and close the document. I am struggling to find how to do this. I have only one Document template in my app. The code I have so far is: POSITION p = GetApp()->GetFirstDocTemplatePosition(); CDocTemplate* pTem = GetApp()->GetNextDocTemplate(p); CBob_photoDoc* pDoc = (CBob_photoDoc*) pTem->OpenDocumentFile(GetApp()->m_pProfStrs->DefFile,false); CBob_photoDoc is my document class. I can now...

Cannot OPEN .EXE files
All, Using outlook on a XP machine and if I am sent a .EXE file it will not allow me to open it. Has any experienced this problem and is there a known fix. Thanks P. Kirby http://www.slipstick.com/outlook/esecup/getexe.htm -- Jocelyn Fiorello MVP - Outlook *** Replies sent to my e-mail address will probably not be answered -- please reply only to the newsgroup to preserve the message thread. *** "CEDAR SPRINGS" <cedar.springs@fpimgt.com> wrote in message news:%23fmvj%23rZDHA.440@tk2msftngp13.phx.gbl... > All, > Using outlook on a XP machine and if I am sent a ...

Some accounts will not sync automatically
I have just changed to a different computer still using Win XP I have moved all my email accounts to WLM on the new computer BUT 2 of the accounts do not sync automatically. Yes they do have a tick in the box to include when sending or receiving. If I select these accounts individually from the sync menu they will sync perfectly but not automatically. I am baffled. I have compared all settings with those on the old computer and they are identical. Pleas can someone help me. What type of accounts are they (POP3, IMAP, HTTP)? How many accounts do you have? You might be runnin...

how do I disable the EULA message each time an Office app opens
Each time I open an office app,ie WORD, Excel; the EULA message to Accept or Decline appears and needs to be answered before the app opens. How does one stop this from coming up each time? ...

opening password protected ppt97-2004 file in ppt 2008 for Mac
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel Hello. I am trying to open a password protected ppt file (Powerpoint 97-2004) in Powerpoint 2008 for Mac. I created the presentation on Powerpoint for Windows, and I know the password. The problem is that Powerpoint for Mac 2008 does not give me the option of entering the password. (Unlike Word for Mac; I've had no problem with password-protected files there.) The message I receive is "This presentation is protected by a password or Digital Rights Management (DRM). To access the presentation, you must have a ve...

How to set MDI view as background view?
I am developing a MDI application and have the requirement to allow for the definition of a single background view. By using a bulletin board analogy, it is more clear what is needed. In this analogy, the background view would be the bulletin board and all other views would be the flyers in the foreground. I have no problems implementing this by changing the z-order of the desired background view by calling the frame window's SetWindowPos() method, provided that no view is maximized. However, I need to implement this capability regardless of the window state; normal, maximized, minimize...

macro code to open most recent file.
I am currently using the following code. I am trying to find some additional code that will go to a designated folder and open the most recent excel file and run the remaining syntax. So this new code would go to the macros folder and find the most recent quote sheet1.xls and open it and run the remainder of the macro it would do the same for the remaining quote sheet files. If I had to save the quote sheet test1, test2, test3 into separate folders I can do that as well. Any help would be greatly appreciated. Sub aaa() Workbooks.Open Filename:="C:\Documents and Settings\Defaul...

Adding multiple files to an account (notes)
Hi, I was wondering if anyone had found a way around the problem of CRM 3.0 not allowing the uploading/attaching of multiple files to the notes field of an account record. Our CRM users need to be able to upload, say 10 jpgs of works carried out at a time, and i'm concerned they will not use the system properly if they have to repeatedly a single file ten times every time they use it. Come on CRM!!! This is basic stuff!! Has anyone found a way of doing this? Many Thanks, Martin. ...

Can excel automatically number itself each time you open a documen
Say you have a general document, is it possible that every single time you or someone else opens that document it generates a new number but never repeats? If Excel can't do this, can word? Use this to do a Google newsgroup search http://www.google.ca/groups?as_q=invoice&safe=off&as_ugroup=*excel*&lr=&hl=en -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "Alesha" <Alesha@discussions.microsoft.com> wrote in message news:915984FE-00AB-439B-B84A-4E28BDC1C2C0@microsoft.com... > Say you have a general document, is it possible tha...

Open workbook at specific worksheet
Is it possible to specify a particular worksheet for a workbook to ope at? Eg. Open file 'Employee.xls' at worksheet titled 'Dave' I can't find any relevant switches to specify on startup, but as a sid note, info on opening position must be recorded within the spreadshee file as a workbook will always open at the last sheet you were using. Any help greatly appreciated. Cheers, Ada -- Message posted from http://www.ExcelForum.com If you save the file with Dave the active worksheet, it'll reopen that way, too. Or you could have a macro do the work for you: Option...

Problem with Full Screen MDI application
Hi all, I have added full screen functionality to MDI application as per fscrn.exe sample provided by microsoft. The problem is when I minimize the application (provided a minimize button on toolbar), and after that lock the computer and log in again, and click on taskbar to show application again, then menubar associated with application shows up. It does not go even if I minimize the application and again show it back. This problem is not present when I just minimize the application without locking the computer. It does not show menubar that time. Please help me. Thank you, Sandeep Kulkarni ...

Associate Multiple System Users with Accounts
Hello, This seems elementary to me, but I can't seem to extend it. Currently, on the Administration tab, you have a Preferred User Field. This field looks up the Preferred User from the System Users. This is good, say this is a System Engineer. Now say you want to have mulitple System Users Associated with an Account. I have looked at adding additional fields to place on this form, but I can't quite get it solved. Example For a Given Account: System Engineer:System USEr1 ServiceMGR:SystemUSer2 AccountAdmin:SystemUser3 etc, etc Or maybe I should create a "Company Accoun...