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 use of Mutex and critical section

2 Answers  


what is the component of CLR ?

8 Answers   AZTEC, Symphony,


what is the use of AFX_MANAGE_STATE ?

4 Answers   HCL,


2.create for 10 batch: Employee_Number Employee_name Employee_Dateofjoining Employee_address Employee_salary 1.select the employee name who deriving more than 10 thousand salary and joined before august 08. use structure and pointers

0 Answers   TCS,


How can we create thread in MFC framework?

3 Answers  






What is the difference between the SDI and MDI

3 Answers   Invensys,


What is the difference between the Encapsulation and Abstraction

25 Answers   HCL, Invensys, TCS, Wipro,


If i derive a new class from CObject what are the basic features my derived wil get ?

4 Answers   Microsoft,


1) How do you Destroy a Dialog Box ?

2 Answers   Honeywell,


What does mfc stand for?

0 Answers  


1)At run-time, you can change the icon by calling the LoadIcon() function?

2 Answers  


In SDI how many view's are attached to document object and in MDI how many view's are attached to Document object?

2 Answers   Wipro,


Categories