How to handle command line arguements from simple MFC
application ?

Answers were Sorted based on User's Feedback



How to handle command line arguements from simple MFC application ?..

Answer / satheesh

Using GetCommandLineArgs() function you can get the
arguments in MFC application at any time. In InitInstance
() function you can change the behaviour of the
application using those values.

Is This Answer Correct ?    5 Yes 0 No

How to handle command line arguements from simple MFC application ?..

Answer / muthu

If it is a simple dialog based application then by using the
'theApp' application object we access commandline argument.

To get the App class object:
AfxGetApp()

To get the command line arguments
theApp->m_lpCmdLine

Use it wherever it required.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More MFC Interview Questions

What is the difference between GetMessage and PeekMessage ?

3 Answers  


1)dynamic creation of a Button ?

2 Answers   TCS,


what is the use of CWinApp class?

3 Answers   Mphasis,


1)does Frame Thickness in MFC?

1 Answers   winfoware,


How to convert the content of buffer into lower case character.

3 Answers   E Logic,






1)How to load an icon on a button as Dynamically ?

1 Answers   HCL,


How to create a Modeless Dialog?

5 Answers  


How many types of combo box are their

2 Answers   Aaditya Info Solutions, E Logic,


How to handle dynamic menus in mfc? What happens when client calls cocreateinstance?

0 Answers  


Explain in sort What is CTargetObject?

2 Answers  


What is the difference between regular dlls and extended dlls?

2 Answers  


what is the difference between SDI and MDI

15 Answers   CMC, HCL, Siemens,


Categories