Page 1 of 1

Where to add headers and how does program flow go?

Posted: Wed Mar 11, 2009 9:44 pm
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.

Posted: Wed Mar 11, 2009 10:49 pm
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

Posted: Thu Mar 12, 2009 6:53 pm
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.

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

Posted: Thu Mar 12, 2009 7:58 pm
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