Hello, I'm sorry if I'm in the wrong sub-forum, I'm a spanish boy and I'm very lost on this forum
I've just downloaded WxDevcpp and I'm a bit lost, I've been programming for a year in C++ but using SDL and console so now I've found out this application and it looks very nice but my doubt is:
When I create a WxWidgets frame project and I put the buttoms in the window, I would like for example to store a number in a variable when you press a button.
For example I put a buttom in my project and I put the name "1" so I want when I press that buttom to store 1 in a int variable, but where do we have here a "int main" function to "make" our program? I hope you understand what I mean.
Thank you in advance.
Help with WxDevcpp and programming
-
- Can't get richer than this
- Posts: 864
- Joined: Thu Jul 28, 2005 9:48 pm
- Location: New Forest, United Kingdom
- Contact:
Hi
Can you show the code you are using, or post the project here, it will help us to help you
Sof.T
Can you show the code you are using, or post the project here, it will help us to help you
Sof.T
The home of Sof.T http://www.sof-t.site88.net/
Author of Programming with wxDevC++
http://sourceforge.net/projects/wxdevcpp-book/
Author of Programming with wxDevC++
http://sourceforge.net/projects/wxdevcpp-book/
Hi, I've just created the project with the "assistant" I didn't write any code, but what the programa creat are 2 .cpp and 2 .h but I can't see a main function.
Here you have a screenshot
http://i34.tinypic.com/24ctjwh.jpg
Here you have a screenshot
http://i34.tinypic.com/24ctjwh.jpg
-
- Can't get richer than this
- Posts: 864
- Joined: Thu Jul 28, 2005 9:48 pm
- Location: New Forest, United Kingdom
- Contact:
Unlike ordinary C++ programming there is no main function. The program is event driven not sequential. I found it difficult to understand when I first started to program like this.
The program starts in the ...App.C file in the function called Init.
When the program starts it sits there waiting for somethin to happen this is called an event. The event could be someone clicking on a button, or it ould be a timer event or a key press, etc.
You need to write sections of code that respond to the events. You can find the events on the event tab in the property inspector.
Sof.T
The program starts in the ...App.C file in the function called Init.
When the program starts it sits there waiting for somethin to happen this is called an event. The event could be someone clicking on a button, or it ould be a timer event or a key press, etc.
You need to write sections of code that respond to the events. You can find the events on the event tab in the property inspector.
Sof.T
The home of Sof.T http://www.sof-t.site88.net/
Author of Programming with wxDevC++
http://sourceforge.net/projects/wxdevcpp-book/
Author of Programming with wxDevC++
http://sourceforge.net/projects/wxdevcpp-book/