DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    new to c++ Guest

    command line options for mdi based app


    how can i add a function to my mdi app so that if the user types in say:
    twice.exe textfile.txt /print
    that it will load textfile.txt and begin printing the file.
    if anyone can help it will be greatly appreciated.
    Thanx.

  2. #2
    jonnin Guest

    Re: command line options for mdi based app


    "main" has parameters, argc and argv, that contain char * to the strings from
    command line and how many. You then parse these to see which options were
    used. they are seperated at typed spaces.

    You have to read these into main this way , but you can send them off to
    another routine from there...



    "new to c++" <twiceonce@hotmail.com> wrote:
    >
    >how can i add a function to my mdi app so that if the user types in say:


    >twice.exe textfile.txt /print
    >that it will load textfile.txt and begin printing the file.
    >if anyone can help it will be greatly appreciated.
    >Thanx.



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links