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
1048 Views

Similar Articles

[PageSpeed] 24

>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:

Looking at a message without opening it
Hi there, This is an Outlook question, despite me mentioning Outlook Express below.. In Outlook Express, I can look at a message in raw format (including ALL email headers, mime parts, etc) by right-clicking on the message in the inbox, select "Properties", select "Details" tab, select "Message Source" button. This will open a text window displaying the whole email in raw format. Can I do that with Outlook as well? Right-click, "Options" does not give me the same possibilities like in Outlook Express. But perhaps there is a plugin or makro I cou...

Writing the DBF file
Hello, All! I have a trouble with writing a database to a file. Here's my code: // Write the file structure SDBFHeader dbfHdr; dbfHdr.nVersion = 0x03; strcpy(dbfHdr.cLastUpdate, _T("3A6")); dbfHdr.nNumOfRecs = m_ctrlList.GetItemCount(); dbfHdr.nNumOfBytesInHdr = 32 + (3 * 32) + 1; dbfHdr.nNumOfBytesInRec = m_nFieldsLength[0] + m_nFieldsLength[1] + m_nFieldsLength[2] + 1; dbfHdr.nReserved1 = 0x00; dbfHdr.nIncmpltTrans = 0x00; dbfHdr.nEncrypt = 0x00; strcpy(dbfHdr.cMultiUser, _T("")); dbfHdr.nIndex = 0x00; dbfHdr.nLangID = 0x00; dbfHdr.nReserve...

outlook 97 no right click functionality in inbox
When I right click on an email I no longer get a context menu. The mouse pointer briefly changes to an egg timer then back to pointer, thats it. anyone have any suggestions? Upgrade to a supported version? --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted without reading. After furious head scratching, werd asked: | When I right click on an email I no longer get a context menu. The | mouse pointer briefly changes to an egg timer then back to pointer, | thats it. | | anyone h...

Excel missing file
I am a registered user of Office XP Pro. Excel will not start. It is missing a file. In the process of moving, disks in storage. Where can I go online to download the missing file? And, how? ...

Modifying Activities associated view 08-25-04
Has anybody tried this unsupported trick in a production environment, or found any problems/issues related to this? Ketil ---------------------------------------------------------------------------------------------------- I've tried this on my test system for the Activities Associated view {00000000-0000-0000-00AA-000010001903}, and it seems to work fine. I can now display and sort by creation date!!! This really solves a major problem with the system and I am keen to try this in my production system. Has anybody used this technique in a production environment yet? Are there any ...

sqlcmd and Error(s) to a file
http://msdn.microsoft.com/en-us/library/ms162773.aspx sqlcmd File Names sqlcmd input files can be specified with the -i option or the :r command. Output files can be specified with the -o option or the :Error, :Out and :Perftrace commands. =========above lines are from the URL listed above============= Ok. If I set this command, I get the desired behavior: :Error "./myerrors.txt" (The desired behavior being, if no errors occur, then that file is created, however, it is empty, which is a great indicator for "nothing bad happened") ================= ...

Open form based on selection
I have a form [frm_modelselect] where I will select a chair model. Then I want to hit a command, or just have a macro that runs onChange. Either way, I want to open a specific form based on the Model that I selected in [frm_modelselect]. How do I go about doing this? Thanks in advance. Travis On Mon, 30 Apr 2007 14:24:04 -0700, Tdahlman wrote: > I have a form [frm_modelselect] where I will select a chair model. Then I > want to hit a command, or just have a macro that runs onChange. > Either way, I want to open a specific form based on the Model that I > selected in [frm_...

Close open space for color fill tool
What is a way to close an open space to use the fill tool? Mark. A small child turns to Ed, and exclaims: "Look! Look! A post from Mark Brown <mbrown@pnint.com>!"... > What is a way to close an open space to use the fill tool? What version of Publisher are you using? How have you created this "open space"? Is it a line/curve? -- Ed Bennett - MVP Microsoft Publisher http://www.mvps.org/the_nerd/ Before reading this message, view the disclaimer: http://mvps.org/the_nerd/disclaim.htm Publisher 2003 XP Pro SP1a I am using the curve tool on a 4 X 6 Postcard....

Workflow question: Upon opening a new case notify team
I am trying to configure CRM so that it will notify a team (all team members) when a case is opened. How would I accomplish this? I have created a team, called tech support, added members, and was setting up a workflow rule when I noticed that you can set up notifications only to users, not teams. This just doesn't seem right. Oh yeah, I also created a new email template. Same thing, 1 owner.... What am I missing? David M Afraid there is no easy way to do this. You could use a Post-URL action to send the message and it could expand out the team members. Also note that you can&#...

Unable to send e-mail and get error message when opening live mail
This is the message I get Your server has unexpectedly terminated the connection. Possible causes for this include server problems, network problems, or a long period of inactivity. Subject 'pic' Server: 'post.camtel.net' Windows Live Mail Error ID: 0x800CCC0F Protocol: SMTP Port: 25 Secure(SSL): No I call server and all is well. Turn off e-mail scanning in your anti-virus program. It is a redundant layer of protection that eats up CPUs, slows down sending and receiving, and causes a multitude of problems such as time-outs, account setting change...

Excel 2002: Can I save all files by just one click ?
Hi, I have 10 working files in an active window. There is no Save All button under the file menu. May I know if I can save all the files at one click without having to exit excel ? Thanks Low This delivers it in 2 clicks ... Hold down Shift key, click File > Close All Then click "Yes to All" in the ensuing prompt to save changes Success? Celebrate it, hit the YES below -- Max Singapore --- "Mr. Low" wrote: > I have 10 working files in an active window. > There is no Save All button under the file menu. > May I know if I c...

Unable to open html attachment in outlook 2000 (Please help)
Currently using outlook 2000. Got an attachment html link. Click open, a new windows --> system32 opened. Click onto the attachment again, Click save as, into my computer, double click the link, then it able to open in IE. Q: Why can't I open it directly, instead I have to save the attachment before open the html file. Please help. Thanks & Regards James something is messed up if it's opening a windows explorer window. I think you'll need to reregister IE. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for ...

Problem Opening Outlook XP
I was having a few small problems with outlook xp so I uninstalled the whole office suite. After uninstalling I cleaned everything refering to "office", "outlook" in the registry (windows xp professional w/sp2) with jv16 PowerTools 2006. Then I reinstalled Office XP. Everything works except, when opening outlook I get the message "Failed to register a VB Script DLL. Reinstall or run Regsvr32.exe Vbscript.dll to self register.". Then outlook closes. I have registered vbscript.dll successfully and still the error. I have un/reinstalled several times now and still t...

Modern.ttf font file requested
Hi, I have bought a Dell computer almost 2 years ago and it already had the modern.ttf font file installed (no, I am not talking about the modern.fon file). I have first reinstalled Windows XP without any problems. When I have installed Windows XP for the second time and thereafter, the modern.ttf file was not installed or it was missing from the Windows XP installation disk. I have looked all over the internet for a possible download link, but have not had any luck. Is there a way that someone would send me the modern.ttf file or tell me of a place to download the file or exactly what sof...

Error with the Deployment Manager- access to the file \CRM\_xslfiles\1_Create.xsl refused
Dear all, Dear all, Configuration: CRM 1.2 on a SBS2003 with the rollup 1.2 I 'm unable to deploy my customization . Indeed, as usual i created some new customization fields through the deployment manager and i added them to the account form. No problem with this. But when i launched the Deployment Manager for publishing it failed after a while and it seems there is a problem to access to the following ..xsl file: ...\CRM\_xslfiles\1_Create.xsl. Before i didn't have this problem. Strange? In the event log i have the message: "Erreur ProcessImportWorkItem : Access to the file &...

outside apps
I have a shortcut on my desktop "c:\lablel.txt" It is a text for I use to print bar code labels.. I would like to be able to run that from a form in access. I have tried creating a "command buttom" using "run application", but that doesn't work. Thanks -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200707/1 ...

Outlook 2007/Vista 64/ "Cannot open the Outlook Window"
Unable to start Outlook; rcv dialog "Cannot Start Microsoft Office Outlook; Cannot open the Outlook Window". Error occurred AFTER a Norton 2009 "idle time scan" hang DURING an Outlook send/receive that was apparrently hung due to Norton. I have attempted several published fixes including Scanpst, DeleteOutlookProfiles, running Outlook with /safe switch (same error), uninstall/reinstall Outlook, turning Norton 2009 off during my process, etc. On reinstall (after running DeleteOutlookProfiles), I create a new profile and a new Outlook PST ... still receive the "...

mail will not move from outbox
I set up Outlook this morning and thoght I had done everything correct, but my email will not move from outbox. I guess I missed something in the setup. Please HELP -- wfw Any error messages when you send and receive? Are you pressing F9 or send and receive button? -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com/ Outlook Tips by email: mailto:dailytips-subscribe-request@lists.outlooktips.net EMO - a weekly newsletter about Outlook and Exchange: mailto:EMO-NEWSLETTER-SUBSCRIBE...

outlook is blanking out previously opened emails
When I open outlook with my msn account previously viewed and/or replied to emails and previously sent emails are all blank. Can anyone help. The messages aare still readble in hotmail but are blank in outlook. "vjvtm4" <vjvtm4@discussions.microsoft.com> wrote in message news:65909A21-3C60-42E9-9321-8789EBCB8CEE@microsoft.com... > When I open outlook with my msn account previously viewed and/or replied to > emails and previously sent emails are all blank. Can anyone help. The > messages aare still readble in hotmail but are blank in outlook. If this...

Problems opening Outlook 2003 #2
I click on the office outlook 2003, it says "configuring outlook accounts", then I get the message, "your microsoft exchange server is unavailable" ( retry, work offline, cancel). I try the work offline tab then a box comes up saying, " unable to open your default email folders, your profile is not configured. I try to configure my profile and something i am doing is not right. Please help. What do I do? Thank you for your help with this problem. Keith Are you trying to connect to an Exchange server? --� Milly Staples [MVP - Outlook] Post all replies to ...

merging files #2
Hi My wife has a number of separate publisher files that she needs to combine into a single file. There doesn't seem to be an obvious way to do this.. I have looked at the "insert" menu and it looks like you can insert a blank page but not an existing file… How do I combine multiple publisher files into one document? Thanks Michael mlsred <mlsred@discussions.microsoft.com> was very recently heard to utter: > How do I combine multiple publisher files into one document? Copy and Paste. -- Ed Bennett - MVP Microsoft Publisher On Fri, 6 Jan 2006 15:20:03 +0000,...

Backing Up Outlook Files #2
Hi I would like to know how I could back up my Outlook files and folders, so that I can trnsfer them to another computer. Please assist!!! http://www.slipstick.com/config/backup.htm is a good place to read about this. -- Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. "Muhammad Yusuf" <anonymous@discussions.microsoft.com> wrote in message news:045601c3b457$0a972d60$a101280a@phx.gbl... | Hi I would like to know how I could back up my Outlook | files and folders, so that I can trnsfer them to another | computer. | | Please assi...

Can't open Excel files
I've never had this problem until now. When I try to open either the Excel application or an excel file on my desktop, a window pops up trying to install Windows XP Professional w/Front Page and the application nor the files will open. I have XP home edition. I can open PPt and Word documents just fine. What's going on?? Thanks, Patsy ...

Publisher files saved to a server 2003 open slowly if at all
I have xp computers running office 2007 all clients save files to a server 2003 equiped dell sc4400 server. When office 2003 was opertaing all clients opened fast from the server. With Office 2007 installed all server files open very slowly. I do not have Office 2007 installed on my server. Could this be the problem? All clients run slowly since the change to office 07 I cannot find anything I should have done to inform my server of the change to Office 07. Please Help. ...

unable to open excel file which contains macro
i am unable to open an excel file which contains macro on my pc. my colleagues are able to open the same file on their pcs. adjusted security settings but doesn't work. pls help What happens exactly when you try to open the file? Any message, etc.? What Excel version? (Posters should _always_ mention this). Close Excel and restart it. Then confirm that Tools, Macro, Security has you at Low or Medium. -- Jim Rech Excel MVP ...