Click here to Skip to main content
15,898,134 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to get all instances of Excel.exe Pin
KTTransfer17-May-10 2:17
KTTransfer17-May-10 2:17 
AnswerRe: EnumWindowsProc( ) , EnumProcessModules , FindWindow( ), Pin
Software_Developer17-May-10 3:00
Software_Developer17-May-10 3:00 
AnswerRe: How to get all instances of Excel.exe Pin
sashoalm17-May-10 5:07
sashoalm17-May-10 5:07 
GeneralRe: How to get all instances of Excel.exe Pin
KTTransfer17-May-10 18:12
KTTransfer17-May-10 18:12 
GeneralRe: How to get all instances of Excel.exe Pin
sashoalm17-May-10 23:33
sashoalm17-May-10 23:33 
GeneralRe: How to get all instances of Excel.exe Pin
T210211-Jan-11 22:00
T210211-Jan-11 22:00 
QuestionHow to register an automation enabled application in the ROT when it's started from the command line. Pin
TClarke17-May-10 0:45
TClarke17-May-10 0:45 
Questionneed help vc++.net please Pin
Gilbertu16-May-10 23:54
Gilbertu16-May-10 23:54 
AnswerRe: need help vc++.net please Pin
Hristo-Bojilov17-May-10 0:09
Hristo-Bojilov17-May-10 0:09 
GeneralRe: need help vc++.net please Pin
Gilbertu17-May-10 0:19
Gilbertu17-May-10 0:19 
QuestionHiding Controls Dynamically in Dialog Pin
Anu_Bala16-May-10 23:40
Anu_Bala16-May-10 23:40 
AnswerRe: Hiding Controls Dynamically in Dialog Pin
Hristo-Bojilov17-May-10 0:59
Hristo-Bojilov17-May-10 0:59 
AnswerRe: Hiding Controls Dynamically in Dialog Pin
Member 392263917-May-10 2:18
Member 392263917-May-10 2:18 
GeneralRe: Hiding Controls Dynamically in Dialog Pin
David Crow17-May-10 3:05
David Crow17-May-10 3:05 
QuestionInput from Commandline. Pin
krishna_CP16-May-10 22:37
krishna_CP16-May-10 22:37 
AnswerRe: Input from Commandline. Pin
Hristo-Bojilov16-May-10 22:44
Hristo-Bojilov16-May-10 22:44 
AnswerRe: Input from Commandline. Pin
Garth J Lancaster16-May-10 23:33
professionalGarth J Lancaster16-May-10 23:33 
AnswerRe: Input from Commandline. Pin
Aescleal17-May-10 1:11
Aescleal17-May-10 1:11 
The official MFC way is to:
- derive a class from CCommandLineInfo and overide CCommandLineInfo::ParseParam
- call CWinApp::ParseCommandLine in your overide of CWinApp::InitInstance using an instance of your class derived from CCommandLineInfo.

When a new instance of your application starts CWinApp::ParseCommandLine slices the command line into tokens and chucks each on in turn into "YourDerivedClass"::ParseParam. ParseParam can do whatever it likes with the tokens it gets - raise or lower flags, set global state, you name it.

If you want a simple class to explore these concepts try this for size:

class simple_command_line_parser : public CCommandLineInfo
{
	public:
		void ParseParam( const wchar_t* parameter, BOOL, BOOL )
		{
			::AfxMessageBox( parameter );
		}
};


All it does is display the parameters it recieves in a message box. You'd use it by adding the following two line to your App's InitInstance:

simple_command_line_parser sclp;
ParseCommandLine( sclp );


Anyway, hope that helps!

Ash
QuestionWriteprivateprofilestring() take delay to update original ini file Pin
Shivanand Gupta16-May-10 20:56
Shivanand Gupta16-May-10 20:56 
AnswerRe: Writeprivateprofilestring() take delay to update original ini file Pin
Richard MacCutchan16-May-10 21:03
mveRichard MacCutchan16-May-10 21:03 
QuestionRe: Writeprivateprofilestring() take delay to update original ini file Pin
David Crow17-May-10 3:08
David Crow17-May-10 3:08 
Questionwmv blank file creation Pin
mohan_chandra8416-May-10 20:29
mohan_chandra8416-May-10 20:29 
Questionreleated to netdefender firewall Pin
promila jangra16-May-10 6:00
promila jangra16-May-10 6:00 
QuestionUseing UTF-8 in CHttpFile Pin
m_code16-May-10 5:27
m_code16-May-10 5:27 
AnswerRe: Useing UTF-8 in CHttpFile Pin
Richard MacCutchan16-May-10 6:26
mveRichard MacCutchan16-May-10 6:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.