Skip to main content
GameDev.net gamedev.net
🔒 Locked

parameter & target-line

Started by 1st_maza Mar 2, 2009 at 4:56 AM 1 replies 550+ views
Original Post
1st_maza
1st_maza
I've just started with DirectX and I'm suppose to learn how to send resolution as a parameter by the target-line (I think I said it right, this: "C:\bla.exe" -MyParameter ).. but I can't seem to find a guide anywhere, MSDN is a jungle and I have no idea where to find anything about it. Anyone know a guide for this?
Evil Steve
Evil Steve
You can just parse the command line passed in the 3rd parameter to WinMain(). In your example, it'll contain "-MyParameter".

You'll need to check for the existence of whatever switches you want and then modify your code accordingly.
1st_maza
1st_maza
thank you for your answer, im gonna look into this and I can't believe I didnt see it.. I believed it would be something extremely difficult like 50 lines of code or something to make it work..

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.