Thread: Incorporating Console and Windows Forms

  1. #1
    Registered User
    Join Date
    Nov 2004
    Location
    Pennsylvania
    Posts
    434

    Incorporating Console and Windows Forms

    Is it possible to use windows forms (generated by MSVC++ Express) to get information and then process it in a 'console function'?

    I've been learning java lately through school and its a simple thing to do, i'm having a bit of trouble trying to do it in C++ though.

    Thanks for any help you can give, or any alternatives!
    "Anyone can aspire to greatness if they try hard enough."
    - Me

  2. #2
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Is it possible to use windows forms (generated by MSVC++ Express) to get information and then process it in a 'console function'?
    With the same program? In other words, you want a program that can use Windows forms and the console at the same time?

    You want to have your cake and eat it too?

    Well, in this case you probably can. I don't know about MSVC, but with Dev-C++, you can check an option in the project options dialog to generate a console.

    Incidentally, you could also write a Windows form program which gathers the information, and have it execute another console program which processes the information.

    Note: unless you use stdin or stdout, you can put a "console" function into a Windows program.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  3. #3
    Registered User
    Join Date
    Nov 2004
    Location
    Pennsylvania
    Posts
    434
    Yeah i dont necessarily mean the program but being able to call back to a function in say Main.cpp and the Windows Forms are in some file called Input.cpp or something like that. I dont need the console, but in the mess of the Input.cpp its nice to take that data and send it back to a more organized .cpp file.


    Thanks
    "Anyone can aspire to greatness if they try hard enough."
    - Me

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. One process with two console windows
    By siavoshkc in forum Windows Programming
    Replies: 8
    Last Post: 01-30-2009, 04:13 PM
  2. Console C++ to full Windows
    By foxon177 in forum Windows Programming
    Replies: 5
    Last Post: 05-12-2008, 09:37 PM
  3. Windows apps verses Console apps
    By nano78 in forum Windows Programming
    Replies: 8
    Last Post: 09-22-2007, 03:41 AM
  4. Windows console problems
    By tigs in forum Windows Programming
    Replies: 2
    Last Post: 03-14-2003, 11:20 AM
  5. Windows Console!
    By Perica in forum Windows Programming
    Replies: 15
    Last Post: 10-18-2002, 08:08 PM