Thread: when the programs open

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    7

    when the programs open

    once the program has been compiled, and you open it must it open in a dos window?? can u not give it its own window like when you open paint it has its own window named paint

  2. #2
    Registered User nevermind's Avatar
    Join Date
    Oct 2002
    Posts
    23
    Well check your settings in the compiler.

    You are able to choose where you want to output your exe files. Then its simply the matter of finding it and executing it.

    I hope this is what your asking.
    "Cut the foreplay and just ask, man."

  3. #3
    Registered User
    Join Date
    Jun 2002
    Posts
    132
    Man, did you even read his question?? Geez.

    WHat you are building, is a console application, you need to create a win32 one. I think you know nothing about Win32 programming, so I suggest to get a book or read tutorials.
    Y3K Network http://www.y3knetwork.com
    Bringing the software of the future on the net.

  4. #4
    stop insulting ppl... there is a way a bad way but it does do something like you wanted

    Code:
    #include <stdlib.h>
    
    int main()
    {
     system("yourfile.exe");
     return 0;
    }
    this will make a program open a program and on top in the status bar it should give you the name of your program in paints case it would say

    Paint

    and now it will say

    yourfile
    Dev C++
    Win XP/2k/98

    I DO NOT TAKE CLASSES I DONT GET HOMEWORK THIS IS NOT A HOMEWORK QUESTION!!!

    He's lean he's keen... He's the spank machine!

  5. #5
    Registered User
    Join Date
    Nov 2002
    Posts
    7
    why is it a bad way??

  6. #6
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    There's nothing bad about that way. All you're doing is sending dos the command to run the program (in case you didn't know that's about what windows does, manipulate dos....in 3x-9x). If you include windows.h you can use shellExecute.

    But i don't think that pertains to the original posters question. I just posted a win32 tutorial zip file in on of the threads on this board, check it out.
    PHP and XML
    Let's talk about SAX

  7. #7
    Registered User
    Join Date
    Nov 2002
    Posts
    7
    is win32 just like C++ or C? is it a seperate language cuz i can't be bothered to learn a new language i am sticking with C++

  8. #8
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    win32 programming is done in c if you use the API, and c++ if you use mfc. Read a tutorial and you'll learn these things.
    PHP and XML
    Let's talk about SAX

  9. #9
    Registered User
    Join Date
    Nov 2002
    Posts
    7
    one more thing..... when i have put the "bad" code in or any other code and click compile & run i get a message saying unable to run program file

  10. #10
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    make sure the program isn't still running, sometimes when using visual c we tend to leave the program run after the last compile (the program you were compiling, not msvc). Make sure the program's closed, if it is, save your workspace and select project, clean. Then try again.
    PHP and XML
    Let's talk about SAX

  11. #11
    booyakasha
    Join Date
    Nov 2002
    Posts
    208
    Ignore the post about the system("yourfile.exe"); , that's not at all what you were asking about, I think the poster didn't understand your question.

    Just start learning about the windows API.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Way to get the current open programs displayed?
    By CPPguy1111 in forum C++ Programming
    Replies: 6
    Last Post: 06-22-2005, 12:24 AM
  2. Big help in Astar search code...
    By alvifarooq in forum C++ Programming
    Replies: 6
    Last Post: 09-24-2004, 11:38 AM
  3. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  4. Keeping the console open.
    By foogoo in forum C++ Programming
    Replies: 5
    Last Post: 10-30-2002, 07:43 PM
  5. executing c++ programs on the web
    By gulti01 in forum C++ Programming
    Replies: 4
    Last Post: 08-12-2002, 03:12 AM