Command-Line MFC

This is a discussion on Command-Line MFC within the Windows Programming forums, part of the Platform Specific Boards category; If I want to pass the arguments : 4999, 61 and 301 When debugging I only have 301 ? I ...

  1. #1
    Registered User
    Join Date
    Sep 2008
    Posts
    3

    Command-Line MFC

    If I want to pass the arguments : 4999, 61 and 301

    When debugging I only have 301 ?

    I overloadad the funtion ParseParam

    Code:
    void CCustomCommandLineInfo::ParseParam(const TCHAR* pszParam, BOOL bFlag, BOOL bLast)
    {
    	if (bFlag)
    	{
    		if (lstrcmp(pszParam, _T("Batch")) == 0)
    			m_bBatch = true;
    	}
    	else
    	{
    		if (m_csIDEn.IsEmpty())
    		       m_nIDEn = _wtoi(pszParam);	
    		else if (m_csIDVer.IsEmpty())
    		       m_nIDVer = _wtoi(pszParam);			
                                    else if (m_csIDComp.IsEmpty())
    		       m_nIDComp = _wtoi(pszParam); 
    	}
    	CCommandLineInfo::ParseParam(pszParam, bFlag, bLast);
    }
    In my InitInstance I have the following code:
    Code:
    	CCustomCommandLineInfo cmdInfo;
    	ParseCommandLine(cmdInfo);
                    if (cmdInfo.m_bBatchLicence) 
    	{
    		m_nVer = cmdInfo.m_nIDVer;
    		m_nComp = cmdInfo.m_nIDComp;
                                   Mn_En = cmdInfo.m_nIDEn; 
    
                          .....
                          ...
    
                      }
    When debuggin I have :cmdInfo.m_nIDEn = 301 and the others are in the dash

    Whow can I pass more than one arguments ?


    Thank you very much

  2. #2
    Registered User
    Join Date
    Sep 2008
    Posts
    3
    Ok thanks I resolve my problem

    I Have to call .exe from a externel application and It works now

  3. #3
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Next time you should also consider posting this on the windows board, too (Too as in you should also make the consideration, not too as in you should multi-post--Sorry but I do think I should make that perfectly clear).

  4. #4
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    Moved to Windows board.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WIndows programming?
    By hostensteffa in forum Windows Programming
    Replies: 7
    Last Post: 06-07-2002, 08:52 PM
  2. Release MFC Programs & Dynamic MFC DLL :: MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 05-18-2002, 06:42 PM
  3. Understanding The Future of MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 04-15-2002, 09:08 PM
  4. Beginning MFC (Prosise) Part III - Now What? :: C++
    By kuphryn in forum C++ Programming
    Replies: 5
    Last Post: 03-03-2002, 05:58 PM
  5. MFC is Challenging :: C++
    By kuphryn in forum C++ Programming
    Replies: 8
    Last Post: 02-05-2002, 12:33 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21