Where to add headers and how does program flow go? Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Mazor
In need of some credit
In need of some credit
Posts: 2
Joined: Wed Mar 11, 2009 9:34 pm

Where to add headers and how does program flow go?

Post by Mazor »

Apologies for asking fundamental questions. I'm not very proficient with wxWidget or C++ at all.

First, I'd like to know how to add custom headers. fstream etc.

Secondly it would be good to know how the flow of wxwidget applications goes. Where is the loop keeping a simple dialog window application from closing and waiting for a user to click a button?

Thanks in advance, and apologies yet again for asking about something so basic.

Also, if it has any relevance to where to add custom headers, I'm using wxdev-cpp.
computerquip
Experienced Solver
Experienced Solver
Posts: 72
Joined: Fri Feb 20, 2009 7:13 pm
Location: $(#wx)\src

Post by computerquip »

I would definitely read a tutorial before you jump right into wxWidgets or ANY GUI library.

http://www.cplusplus.com/doc/tutorial/

http://www.cprogramming.com/tutorial.html
Mazor
In need of some credit
In need of some credit
Posts: 2
Joined: Wed Mar 11, 2009 9:34 pm

Post by Mazor »

No. It is specifically for wxwidget projects in wxdev-cpp that adding custom headers is not working.

And regardless of whether my first question deserves an answer (I'd really appreciate one, and in my opinion it does), the second one really should.
mc2r
wxWorld Domination!
wxWorld Domination!
Posts: 1195
Joined: Thu Feb 22, 2007 4:47 pm
Location: Denver, Co
Contact:

Re: Where to add headers and how does program flow go?

Post by mc2r »

Mazor wrote:Apologies for asking fundamental questions. I'm not very proficient with wxWidget or C++ at all.

First, I'd like to know how to add custom headers. fstream etc.
Exactly the same as any c++ header. They go before anything they declare or define is used. I am guessing that maybe you don't have your include paths setup correctly. It's hard to give more than a guess with out seeing any code or corresponding errors.

If its just the include paths not being setup there are tutorials for this for wxdev-cpp, a quick search of the forum should turn it up, or maybe someone that uses wxdev will post it.
Mazor wrote:Secondly it would be good to know how the flow of wxwidget applications goes. Where is the loop keeping a simple dialog window application from closing and waiting for a user to click a button?

The loop is hidden in wxApp and you don't generally need to mess with it, definitely not if you are just starting out with wxWidgets. The wxApp loop will dispatch messages to the appropriate place, you just need to write the event handlers to "catch" events such as a user clicking on a button.

I'd read the getting started topics here
http://docs.wxwidgets.org/stable/wx_ove ... #overviews

and then maybe the guides and tutorials at the wiki
http://wiki.wxwidgets.org/Main_Page

These were written both so people starting out would have a a source to explain how to get started and so wouldn't have to answer the same questions every time someone new started developing with wxWigets.

Don't take this to be unfriendly, ask whatever questions you have on these tutorials posting specific examples, code, errors etc... and you will receive plenty of feedback/help.

-Max
Post Reply