Hey,can anyone tell me how to invoke a new application/software using c++ or visual c++.
Also, gor interfacing a gui with my c++ code,should i go for vc++?
You can start another program using the system() function.
As for a GUI, I would suggest Qt4.
Along with the system() function, you could also try to use the fork() and exec() methods, shown here:
For a GUI toolkit, the big ones are
There is also FLTK, which is a very powerful GUI toolkit, and it has a less steep learning curve than the ones listed above. But, it is less common, and some people consider it to "lack polish". However, if you are just starting with GUI programming, I would consider FLTK to be the best choice. After you have more experience with GUI programming, I would use Qt. Very professional, and widely used. Also, last year, they released an option to use Qt with the LGPL license. Here are a couple of articles on this:
Here are a few comparisons for all the toolkits:
Edited 6 Years Ago by tundra010: n/a
how to invoke another process is operating system dependent. fork() creates another process from the currently running process, it does not invoke a new process that is not currently running -- and its only supported by *nix machines.. system() as suggested by dave is supported on all (or most) operating systems.
>>Also, gor interfacing a gui with my c++ code,should i go for vc++?
vc++ is NOT a language -- its just another IDE/compiler like g++.
Thank you guys.
My application would run on Windows. Would I be able to invoke and run another application (say,provide the files selected by the user in the GUI to Matlab) using system() command while my C++ program is still running?
Can't SPAWN() and exec() do the job?
Does VisualC++ provide some mechanism or libraries to interface GUI with my C++ code?
Can you suggest me some tutorials on QT or FLTK?
Sorry for writing gor instead of for
There are a number of ways to start another process. system() is just one of them. On MS-Windows you can also call CreateProcess(), ShellExecute(), and spawn(). The all do basically the same thing, but CreateProess() gives your program a lot more control over the process being executed than the other functions.
>>Does VisualC++ provide some mechanism or libraries to interface GUI with my C++ code?
Not the free version. With that you have to resort to pure win32 api function calls. But you could use the free wxWidgets c++classes.
Edited 6 Years Ago by Ancient Dragon: n/a
I have licensed version of VC++. Can you suggest me some compiler which would be easy to work with when it comes to making GUIs(say using QT or libraries proovided in VC++),interfacing it with your C++ program,invoking another application while your program is still running and later storing your data in a database.?
If you have the Professional version or better then you could use MFC (unmanaged code) or even Windows Forms (CLR managed code)
We've already covered invoking other application, so I won't repeat myself and others.
Databases. If it's an SQL compliant database like MySQL, Access, Oracle, Sybase and many others, you will also have to learn SQL. google for SQL tutorials and you will easily find them. After that you might want to learn ODBC, which is a very common set of database access functions. If you are using MySQL there is a MySQL++ c++ class that makes it a little easier.
If your data is not really very complicated and SQL might be overkill, then you could just write out the data in a normal text or binary file.
in window, you can use createprocess() to call any application and in linux use system or exec system call to call new application.
Edited 6 Years Ago by harris21: n/a
thank you all.
Hello All ...
Iam Getting An Error With try to excecute the stored procedure .
I have Have Sql database , the stored procedure like so :
USE [MPRS] GO /****** Object: StoredProcedure [dbo].[Search_Licenses_By_Number] Script Date: 26-Nov-16 8:06:52 AM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE ...
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...