Click here to Skip to main content
15,897,371 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Visual C++ Express Edition Pin
Christian Graus21-Sep-06 10:43
protectorChristian Graus21-Sep-06 10:43 
QuestionAccess Violation? Pin
BlackDice21-Sep-06 9:33
BlackDice21-Sep-06 9:33 
AnswerRe: Access Violation? Pin
Chris Losinger21-Sep-06 9:47
professionalChris Losinger21-Sep-06 9:47 
AnswerRe: Access Violation? Pin
Jörgen Sigvardsson21-Sep-06 9:50
Jörgen Sigvardsson21-Sep-06 9:50 
AnswerDoh!! Pin
BlackDice21-Sep-06 10:06
BlackDice21-Sep-06 10:06 
QuestionHow I can get the text from x,y coordinate? Pin
Marco225021-Sep-06 7:06
Marco225021-Sep-06 7:06 
AnswerRe: How I can get the text from x,y coordinate? Pin
Chris Losinger21-Sep-06 7:12
professionalChris Losinger21-Sep-06 7:12 
GeneralRe: How I can get the text from x,y coordinate? Pin
led mike21-Sep-06 7:53
led mike21-Sep-06 7:53 
GeneralRe: How I can get the text from x,y coordinate? Pin
Chris Losinger21-Sep-06 7:57
professionalChris Losinger21-Sep-06 7:57 
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 

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.