473,473 Members | 2,110 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

buttons and events

4 New Member
Hiiiiiiiiii
I am really sorry i am just a beginner and you may find my question a silly one but plz i need help as soon as possible ..
How can I make a c++ file to be executed when the user click on a button in a dialog box .......how can i connect between them ...
I have three c++ programs each one makes certain functions and i want to make a dialog box with three buttons in it (which i can till now) ,button for each program so when the user click on button1 the first program is executed and when clicking on button2 the second program is executed and so on ....

Plz help
Nov 3 '06 #1
4 1826
lottus
4 New Member
and i forgot to tell iam working on Visual c++ not c builder (if there any differances (: )
Nov 3 '06 #2
horace1
1,510 Recognized Expert Top Contributor
The are various ways to do this but the simplest is to use the function system() which has a single parameter, a command line exactly as typed at a terminal:
Expand|Select|Wrap|Line Numbers
  1.     system("dir *.c");                                         /* call system */
  2.     printf("parent program resumed");
  3.  
The parent process is suspended and the command line dir *.c is passed to the system which, assuming all is well, executes the dir command. When it finishes the parent process resumes.
Nov 3 '06 #3
lottus
4 New Member
The are various ways to do this but the simplest is to use the function system() which has a single parameter, a command line exactly as typed at a terminal:
Expand|Select|Wrap|Line Numbers
  1.     system("dir *.c");                                         /* call system */
  2.     printf("parent program resumed");
  3.  
The parent process is suspended and the command line dir *.c is passed to the system which, assuming all is well, executes the dir command. When it finishes the parent process resumes.
I don't know if you understand what i want , any way is there any other way cuz iam not following here .....
Nov 4 '06 #4
lottus
4 New Member
sorry i tried it but it didn't work
when i click on the button the only thing i get is the Ms-DOS command prompt opened for only a milli second and nothing else happened....
Nov 4 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Eric | last post by:
I have the following function which creates buttons on Excel commandbar. The problem i can't get the buttons to hook up to events. For example, if i create four buttons only the fourth one fires...
0
by: Andrés Giraldo | last post by:
Hi! I'm adding an asp button to a datagrid on the ItemDataBound event, when the user clicks on this button, I basically remove the button and create other 2 buttons... my problem is.. the 2 last...
0
by: KK | last post by:
Hi I have a main page called lobby.aspx. lobby have the main menu. below that I loads web user controls (ascx) according to the selected main menu (into a placeholder). Some of my ascx,...
4
by: Irfan Akram | last post by:
Hi People, I need to add flash buttons to ASP.NET page. Problem is I have added them, but I am not able to link events with those buttons, as with normal ASP.NET buttons. I am sure there is a...
0
by: Klaus Jensen | last post by:
Hi! This has been annoying me for a while now, and I can't get it to work It is really driving me nuts! Basicly this simple webapp created to illustrate my problem, renders five buttons, and...
3
by: Devron Blatchford | last post by:
Hi there, Can someone tell me how I can detect media buttons (play, stop etc) in VB.NET. KeyPress, up, down events don't seem to capture them. Thanks Devron
3
by: Mark | last post by:
Assume you want to dynamically add one to many link button controls to a web page dynamically at run time. Each link button needs to post back and execute code. As the link buttons are created at...
5
by: Amoril | last post by:
I've read quite a few different message on various boards and for some reason I'm still having trouble wrapping my head around this viewstate maintenance and trying to get these dynamically created...
4
by: Z.K. | last post by:
I started a forms application and I put on the form three buttons. In the functions for the radio buttons I put in a single messagebox like: MessageBox("Hello 1") MessageBox("Hello 2") ...
8
by: GaryDean | last post by:
I have a Wizard page and need to affect the next and previous buttons from my code-behind. I've googled around and found two solutions, and neither appear to work. I can access the SideBarList...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.