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

Tell me the different controls in MFC ?

5 Answers  


what is the use of Mutex and critical section

2 Answers  


How to access document object from view ?

1 Answers  


how to repaint when working with horizontal scroll bar

0 Answers  


Q1. A. What is unary operator? List out the different operators involved in the unary operator. B. What is an adjust field format flag? Q2. A. Distinguish between a # include and #define. B. Can a list of string be stored within a two dimensional array? Q3. A. Explain how a pointer to function can be declared in C++? B. List the merits and demerits of declaring a nested class in C++? Q4. A. What are the syntactic rules to be avoid ambiguity in multiple inheritence? B. Explain the operation of overloading of an assignment operator. Q5. A. Explain how the virtual base class is different from the conventional base classes of the opps. B. Explain how an exception handler is defined and invoked in a Program. Q6. A. What is a binary file? List the merits and demerits of the binary file usagein C++. B. Write short notes on Text Manipulation Routines. C. Write bites in Turbo c++ Header ("Include") Files.

3 Answers   ABC, HCL, Infosys,


Tell us something about MFC?

7 Answers   Microsoft,


Explain Doc/View architecture

6 Answers   Huawei,


How can we create thread in MFC framework?

3 Answers  


How to update all the views whenver document got updated ?

1 Answers  


In VC++ How to transfer between one exe to another exe while running..

5 Answers   Wipro,


Hi can anyone explain about the synchronization objects types and where we are using in the code.

1 Answers  


Explain about MDI and CMultiDocTemplate ?

2 Answers  


Categories