hello , before 5 months I made a program by c language by borland c++ compiler v 3.1 . and it was run on console
application.(dos). so. now i would like to make GUI program by vc++ 6 and this GUI program have a botton and when i will press this botton I can call my program without make any change with source code. is that possible .?
and how i can do this.?:-/

Recommended Answers

All 8 Replies

Depends on what you mean by "call my program". If you just want to launch the already compiled *.exe program then the answer is Yes. There are several ways to spawn an executable program. system() is one such function, win32 api CreateProcess() is another.

Why do you want to use VC++ 6.0 compiler? Is old and does not support c++ language very well. Get the free VC++ 2008 Express which is a pretty good compiler (IMO). Or you can get free C# Express which has gui programming built into the IDE. There are many alternatives, VC++ 6.0 should not be considered.

Depends on what you mean by "call my program". If you just want to launch the already compiled *.exe program then the answer is Yes. There are several ways to spawn an executable program. system() is one such function, win32 api CreateProcess() is another.

Why do you want to use VC++ 6.0 compiler? Is old and does not support c++ language very well. Get the free VC++ 2008 Express which is a pretty good compiler (IMO). Or you can get free C# Express which has gui programming built into the IDE. There are many alternatives, VC++ 6.0 should not be considered.

I mean there is program run on dos I made it by C language with "exe" extend . so i would like to make botton
by any IDE .. but I learned how to do this in vc++ 6 and it's so easy but i don't know
how to call that program from this botton..?

what is "this botton" mean? Are you talking about a "button", such as something you click with the mouse? If yes, then call the dos program in the button's onClick event handler.

yes. I mean this " click a botton to call my dos program" ... is that possible and how I can do this by vc++ 6.0.?

The easiest way is to create a new C++ MFC program. If you don't know how to do that then see Microsoft's Scribble tutorial. Too complicated to explain fully here.

I know how to do "c++ mfc program"
and I was do the botton . but I don't know how to call a dos "exe" program by clicking on that botton.?

I already told you how to do it in my first response to this thread. What don't you know how to do -- create an event handler in MFC or use the system() function?

And, BTW: please learn how to spell button

ok. thank you very much for your helping me..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.