Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Problem with double clicking

Posted on 2004-04-29
11
Medium Priority
?
191 Views
Last Modified: 2013-11-20
Hi,

When a document created by my app is double clicked in Windows I always get the following error message:

“Can’t file file c:/……./Myfile.kk  (or one of their components). Make sure that the path and file name are correct and all the libraries are available”

(Note: My OS is in Spanish so this is just a straight translation)

However, it does work properly if the file is dragged and dropped into the application.
Any idea?
Thanks in advance for your help.
elito
0
Comment
Question by:elito
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 
LVL 3

Expert Comment

by:stu_pb
ID: 10952590
use the registry editor to make sure the path to the executable is correct.

1) open the registry editor (Start->Run->regedit)
2) Expand the HKEY_CLASSES_ROOT key
3) Find the .kk (file extension)
4) Get the default value of the .kk (file extension) key
5) Find the default value under HKEY_CLASSES_ROOT
6) Expand the key to Shell->Open->Command
7) The default value of the command key is the path to the executable, make sure it is correct.
0
 

Author Comment

by:elito
ID: 10952837
it seems that the path to the executable is correct.

Any other suggestion?
Thanks!
0
 

Author Comment

by:elito
ID: 10953071
In fact, when the document is double clicked, the applciation is launched but as soon as the error message pops up, the app is automatically closed.
0
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 
LVL 3

Expert Comment

by:stu_pb
ID: 10953714
Have you tried debugging the app to see where this occurrs?
0
 

Author Comment

by:elito
ID: 10954237
That was the first thing I tried but I'm not sure about how to debug the program ... I put several break points in the application but when I double click on the file, it seems that the debugger is not launched ... The question is, how can I debug a program that is launched externally as in this case?

Thanks
0
 
LVL 3

Accepted Solution

by:
stu_pb earned 136 total points
ID: 10954873
Sorry it took so long to reply.

At the very beginning of the program insert a Sleep command e.g. Sleep(30000);

This will allow you enough time to set up the debugger. The parameter to the sleep function is in milliseconds.

Start Visual C++
Compile the program in debug mode.
double click on the file to open
in visual studio go to build->start debug->attach to process ( i think it is the build menu)
in the process dialog box select the name of your application.
open the file where the Sleep() command is
set a break point after the sleep command.
wait for the 30 seconds to elapse and the break point should be triggered.

0
 
LVL 31

Assisted Solution

by:Zoppo
Zoppo earned 132 total points
ID: 10958729
Hi elito,

in addition to 'stu_pb's comment: if your app doesn't use DDE ensure that in the Shell->Open->Command the '%1' is enclosed by "s, i.e. '...\path\yourapp.exe "%1"'

ZOPPO
0
 
LVL 39

Assisted Solution

by:itsmeandnobodyelse
itsmeandnobodyelse earned 132 total points
ID: 10964357
Zoppo is right:

if the path to the executable or the path to the document file contains any space characters you have to use quotes "" both for the path to the executable and the %1 place holder.

      "c:/.../your_executable" "%1"

Regards, Alex
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question