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.?:-/

Re: help with program in c language 80 80

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.

Re: help with program in c language 80 80

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..?

Re: help with program in c language 80 80

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.

Re: help with program in c language 80 80

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.?

Re: help with program in c language 80 80

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.

Re: help with program in c language 80 80

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.?

Re: help with program in c language 80 80

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

Re: help with program in c language 80 80

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

Be a part of the DaniWeb community

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