newbie thing: Reading command line arguments in an MFC dialog-based App
-
I realize this sounds idiot, but how do you ?? I can't find any main() or wmain() function in my project and can't acces any argc or argv. I tried to acces them anyway but they are undefined. Searching through the SDK I only found 2 functions: GetCommandLine(); CommandLineToArgvW First one seems to work but the second I couldn't convince to work. And I surely tried. Simply hates me. Does anyone have any ideea, HOW CAN I READ THE COMMAND LINE ARGUMENTS IN AN ARRAY OR SOMETHING SIMILAR TO ARGC AND ARGV? TIA!! ;-)
-
I realize this sounds idiot, but how do you ?? I can't find any main() or wmain() function in my project and can't acces any argc or argv. I tried to acces them anyway but they are undefined. Searching through the SDK I only found 2 functions: GetCommandLine(); CommandLineToArgvW First one seems to work but the second I couldn't convince to work. And I surely tried. Simply hates me. Does anyone have any ideea, HOW CAN I READ THE COMMAND LINE ARGUMENTS IN AN ARRAY OR SOMETHING SIMILAR TO ARGC AND ARGV? TIA!! ;-)
-
I realize this sounds idiot, but how do you ?? I can't find any main() or wmain() function in my project and can't acces any argc or argv. I tried to acces them anyway but they are undefined. Searching through the SDK I only found 2 functions: GetCommandLine(); CommandLineToArgvW First one seems to work but the second I couldn't convince to work. And I surely tried. Simply hates me. Does anyone have any ideea, HOW CAN I READ THE COMMAND LINE ARGUMENTS IN AN ARRAY OR SOMETHING SIMILAR TO ARGC AND ARGV? TIA!! ;-)
The CRT sets up equivalent variables for you:
__argc
and__argv
--Mike-- Ericahist | CP SearchBar v2.0.2 | Homepage | 1ClickPicGrabber | RightClick-Encrypt If my rhyme was a drug, I'd sell it by the gram. -
I realize this sounds idiot, but how do you ?? I can't find any main() or wmain() function in my project and can't acces any argc or argv. I tried to acces them anyway but they are undefined. Searching through the SDK I only found 2 functions: GetCommandLine(); CommandLineToArgvW First one seems to work but the second I couldn't convince to work. And I surely tried. Simply hates me. Does anyone have any ideea, HOW CAN I READ THE COMMAND LINE ARGUMENTS IN AN ARRAY OR SOMETHING SIMILAR TO ARGC AND ARGV? TIA!! ;-)