Click here to Skip to main content
15,922,325 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Windows GDI and Bitmap tutorials Pin
Paul M Watt22-Apr-02 5:58
mentorPaul M Watt22-Apr-02 5:58 
GeneralChristian Graus, Continuously changing display - Pin
User 988522-Apr-02 5:18
User 988522-Apr-02 5:18 
GeneralRe: Christian Graus, Continuously changing display - Pin
Paul M Watt22-Apr-02 5:53
mentorPaul M Watt22-Apr-02 5:53 
GeneralRe: Christian Graus, Continuously changing display - Pin
User 988522-Apr-02 6:26
User 988522-Apr-02 6:26 
GeneralRe: Christian Graus, Continuously changing display - Pin
Ravi Bhavnani22-Apr-02 6:18
professionalRavi Bhavnani22-Apr-02 6:18 
GeneralRe: Christian Graus, Continuously changing display - Pin
User 988522-Apr-02 6:56
User 988522-Apr-02 6:56 
GeneralRe: Christian Graus, Continuously changing display - Pin
Ravi Bhavnani22-Apr-02 7:32
professionalRavi Bhavnani22-Apr-02 7:32 
GeneralShellOpen is hosed Pin
#realJSOP22-Apr-02 5:15
professional#realJSOP22-Apr-02 5:15 
Using the following:
VC++ 6.0/sp5
Win2K, Win95, and Win98

Our app uses some proprietary file formats and of course, the appropriate file types are associated with our app. However, when I double-click an associated file type, I get a message that is generate by windows that reads:

Cannot find the file "full path/name of file I clicked on" or one of it's
components.  Make sure the path and filename are correct and that all
required libraries are available.


The path\filename are correct, and all of the required libraries are available. In fact, if I just load the app and open the very same file from within the app, it opens fine. Similarly, if I pass the desired filename in on the commandline, it opens fine. I can also drag a file onto the app window, and it will open without complaint.

At the top of OnInitInstance(), I have added the following code:

CString sCmdLine = ::GetCommandLine();
AfxMessageBox(sCmdLine);


The resulting string shows this (including all quote marks shown):

"D:\path\myprogram.exe" "


When I manually pass the filename in on the commandline, the same string shows this:

"D:\path\myprogram.exe" "D:\path\myfile.xyz"


What the heck is wrong here?




"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

Please review the Legal Disclaimer in my bio.
GeneralRe: ShellOpen is hosed Pin
l a u r e n22-Apr-02 5:25
l a u r e n22-Apr-02 5:25 
GeneralRe: ShellOpen is hosed Pin
#realJSOP22-Apr-02 5:58
professional#realJSOP22-Apr-02 5:58 
GeneralRe: ShellOpen is hosed Pin
l a u r e n22-Apr-02 6:01
l a u r e n22-Apr-02 6:01 
GeneralRe: ShellOpen is hosed Pin
Jim Crafton22-Apr-02 6:29
Jim Crafton22-Apr-02 6:29 
GeneralRe: ShellOpen is hosed Pin
Jim Crafton22-Apr-02 6:31
Jim Crafton22-Apr-02 6:31 
GeneralRe: ShellOpen is hosed Pin
David Defoort22-Apr-02 6:31
David Defoort22-Apr-02 6:31 
GeneralRe: ShellOpen is hosed - the answer Pin
#realJSOP22-Apr-02 6:59
professional#realJSOP22-Apr-02 6:59 
GeneralRe: ShellOpen is hosed - the answer Pin
#realJSOP22-Apr-02 8:59
professional#realJSOP22-Apr-02 8:59 
GeneralRe: ShellOpen is hosed - the answer Pin
Gary Kirkham21-Jan-04 5:29
Gary Kirkham21-Jan-04 5:29 
GeneralRe: ShellOpen is hosed - the answer Pin
#realJSOP21-Jan-04 11:18
professional#realJSOP21-Jan-04 11:18 
GeneralSimple MFC question. Pin
Jason Hooper22-Apr-02 5:13
Jason Hooper22-Apr-02 5:13 
GeneralRe: Simple MFC question. Pin
Michael P Butler22-Apr-02 5:25
Michael P Butler22-Apr-02 5:25 
GeneralRe: Simple MFC question. Pin
l a u r e n22-Apr-02 5:28
l a u r e n22-Apr-02 5:28 
GeneralRe: Simple MFC question. Pin
Jason Hooper22-Apr-02 5:33
Jason Hooper22-Apr-02 5:33 
GeneralRe: Simple MFC question. Pin
User 988522-Apr-02 5:45
User 988522-Apr-02 5:45 
GeneralRe: Simple MFC question. Pin
l a u r e n22-Apr-02 5:47
l a u r e n22-Apr-02 5:47 
GeneralDirectly calling framework... Pin
Jamie Hale22-Apr-02 5:04
Jamie Hale22-Apr-02 5:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.