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 command routing in MFC framework?

3 Answers  


What is the difference between the ASSERT and VERIFY macros?

4 Answers  


I can i set size of integer variable should be fixed for different operating systems(Ex i want integer size is 2bytes in OS)

2 Answers   Invensys,


General purpose classes in MFC

1 Answers   TCS,


How you create a button dynamically?

2 Answers  






Tell me about different kinds of synchranization objects ?

6 Answers  


Which MFC function is used to display output?

9 Answers   TCS,


Difference between Debug and Release versions?

4 Answers  


1)To Remove WS_MINIMIZEBOX in a Frame ?

1 Answers  


What is the difference between GetMessage and PeekMessage ?

3 Answers  


What is the base class for MFC Framework ?

4 Answers  


Name the Synchronization objects?

2 Answers  


Categories