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 function is used to disable a control at runtime?

7 Answers  


What are the differences between MFC Exception macros and C++ exception keywords?

2 Answers  


1)How to create ToolTip in MFC?

2 Answers  


how does the UIThread and worker thread communicates and handle events

2 Answers   HCL,


what is functioning of DIalodDataXchange ..?

0 Answers  






How to convert a CString variable to char* or LPTSTR?

5 Answers   Dover,


visual Pogramming c++ coding for create a paint application.. (Please someone help me)

2 Answers  


plzz tell me what we can do and dont in tally ERP & sap business one?

0 Answers  


Can you explaing the relashionship between document,frame and view ?

2 Answers  


how do u identify RTTI in vc++

4 Answers   Siemens,


How can update edit control data of an executing application from other application?

3 Answers   HP,


1.Get string1,string2,string3 1.add string1 and 2,string1 and 3. 2.replace vowels with T 3.count number of T. 4.remove T 5.COPY string1 to stringf. 6.restore string1. print the following 1.Number of T 2.StringF 3.string1+string2+string3 Use pointers and functions

1 Answers  


Categories