Click here to Skip to main content
15,887,683 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How I can get the text from x,y coordinate? Pin
led mike21-Sep-06 8:02
led mike21-Sep-06 8:02 
GeneralRe: How I can get the text from x,y coordinate? Pin
Chris Losinger21-Sep-06 8:09
professionalChris Losinger21-Sep-06 8:09 
GeneralRe: How I can get the text from x,y coordinate? Pin
Stephen Hewitt21-Sep-06 15:58
Stephen Hewitt21-Sep-06 15:58 
AnswerRe: How I can get the text from x,y coordinate? Pin
led mike21-Sep-06 8:06
led mike21-Sep-06 8:06 
QuestionThreads in vc++.net 1.1 Pin
sandeep_thakur21-Sep-06 7:05
sandeep_thakur21-Sep-06 7:05 
AnswerRe: Threads in vc++.net 1.1 Pin
led mike21-Sep-06 7:54
led mike21-Sep-06 7:54 
GeneralRe: Threads in vc++.net 1.1 Pin
sandeep_thakur21-Sep-06 10:53
sandeep_thakur21-Sep-06 10:53 
Question_argv[] proglems Pin
hlmechanic21-Sep-06 6:31
hlmechanic21-Sep-06 6:31 
I have written a C++ program and I wish it to be able to be started by dragging a file icon onto the program icon in windows explorer. The program name is prog.exe, the file name is file.syx, they are both in folder "H:\folder". When the file is dragged onto the program icon in explorer and starts, the value of _argc=1 with _argv[0] being "H:\folder\prog.exe" and _argv[1] being "H:\folder\file.syx" as expected. I then use this information to open file.syx.

However, if the program and file are moved to a folder with a space in the name such as "H:\copy of folder", then when I drag file.syx onto prog.exe I get these unexpected results. _argc=3 with _argv[0]="H:\folder\prog.exe", _argv[1]="of", _argv[2] = "folder\prog.exe H:\copyof~2\file.syx".

If I just double click "H:\copy of folder\prog.exe" I get _argc=3 with _argv[0]="H:\folder\prog.exe", _argv[1]="of", _argv[2] = "folder\prog.exe ".

I have tested this program on windows98 and windowsXP with the same basic results. If anybody knows how to consistently get the name of a file that is ‘dragged onto a program icon to start that program’ from inside that program then I would appreciate the help.
QuestionRe: _argv[] proglems Pin
David Crow21-Sep-06 6:49
David Crow21-Sep-06 6:49 
GeneralRe: _argv[] proglems Pin
hlmechanic21-Sep-06 6:56
hlmechanic21-Sep-06 6:56 
GeneralRe: _argv[] proglems Pin
David Crow21-Sep-06 7:00
David Crow21-Sep-06 7:00 
GeneralRe: _argv[] proglems Pin
hlmechanic21-Sep-06 7:12
hlmechanic21-Sep-06 7:12 
QuestionRe: _argv[] proglems Pin
David Crow21-Sep-06 7:26
David Crow21-Sep-06 7:26 
AnswerRe: _argv[] proglems Pin
hlmechanic21-Sep-06 7:35
hlmechanic21-Sep-06 7:35 
GeneralRe: _argv[] proglems Pin
David Crow21-Sep-06 7:42
David Crow21-Sep-06 7:42 
GeneralRe: _argv[] proglems Pin
hlmechanic21-Sep-06 8:05
hlmechanic21-Sep-06 8:05 
GeneralRe: _argv[] proglems Pin
David Crow21-Sep-06 8:47
David Crow21-Sep-06 8:47 
GeneralRe: _argv[] proglems Pin
hlmechanic21-Sep-06 8:57
hlmechanic21-Sep-06 8:57 
GeneralRe: _argv[] proglems Pin
David Crow21-Sep-06 9:15
David Crow21-Sep-06 9:15 
GeneralRe: _argv[] proglems Pin
hlmechanic21-Sep-06 9:55
hlmechanic21-Sep-06 9:55 
GeneralRe: _argv[] proglems Pin
David Crow21-Sep-06 10:09
David Crow21-Sep-06 10:09 
GeneralRe: _argv[] proglems Pin
hlmechanic21-Sep-06 12:09
hlmechanic21-Sep-06 12:09 
GeneralRe: _argv[] proglems Pin
David Crow22-Sep-06 3:02
David Crow22-Sep-06 3:02 
AnswerRe: _argv[] proglems Pin
hlmechanic21-Sep-06 17:01
hlmechanic21-Sep-06 17:01 
QuestionRe: _argv[] proglems Pin
David Crow22-Sep-06 3:16
David Crow22-Sep-06 3:16 

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.