hi! I'm new here! pls help

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
yiyoascen
In need of some credit
In need of some credit
Posts: 1
Joined: Tue May 23, 2017 6:54 pm

hi! I'm new here! pls help

Post by yiyoascen »

Hi everyone, I have been studying C++ for this semester at college (somehow my teacher thinks it's a good idea to force all of his students into wxWidgets without explaining it himself), so I need to build a calculator using wxWidgets, but I can't understand the documentation at all and don't know really where to start...

I've already downloaded it and codeblocks just for this class, and I find C++ really confusing for my second semester, and the teacher is really into NOT explaining things that he considers basic. Where can I start to understand this framework for someone who understands more about python, html and css with js
coderrc
Earned some good credits
Earned some good credits
Posts: 141
Joined: Tue Nov 01, 2016 2:46 pm

Re: hi! I'm new here! pls help

Post by coderrc »

read this https://www.wxwidgets.org/docs/book/

http://www.anthemion.co.uk/dialogblocks/
download that,

create your GUI
let it generate the C++
???
profit

eta: when you have a specific question, the people here are super helpful. But for nebulous questions like "how do I shot code?" will probably not get you very far.
DavidHart
Site Admin
Site Admin
Posts: 4252
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: hi! I'm new here! pls help

Post by DavidHart »

Hi,

I hate to disagree with another poster, but:
The wx book at https://www.wxwidgets.org/docs/book/ was published in 2005. While many parts of it still apply, it's not the best place for a new user to start.

DialogBlocks, though fine in itself, is equivalent to the CodeBlocks that you already have. You certainly don't need both.

My advice is different. First, download the wxWidgets source-code if you haven't already (you may have downloaded only a binary package). Then look at the samples in its samples/ directory; in particular start with 'minimal'. That's a very simple sample, but it shows the basics of all wx programs. It's also fairly well commented. Examine the source-code, then build and run it.

Next, you need to understand sizers, the wx layout mechanism. See this tutorial first, then the sizer overview. That mentions wxGridSizer, which you may use as the basis for the numerical bit of the display.

All that should at least get you started ;) .

Regards,

David
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: hi! I'm new here! pls help

Post by doublemax »

Learning wxWidgets without knowing C++ first will be challenging.

In addition to what the others said, i'd like to recommend this tutorial: http://zetcode.com/gui/wxwidgets/

Parallel to this, study the "minimal" sample, like David said. It's important to have at least a basic understanding of the "anatomy" of a wxWidgets application.

Unlike the others, i would not recommend to start with a GUI editor. I think it's preferable to learn how a GUI is built with code before you learn to use a GUI editor. As you're familiar with HTML, CSS and JS, you probably build your GUI more or less "by hand", too.

And if you know how table-based layouts were built in HTML1, wxSizers work very similar.
Use the source, Luke!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: hi! I'm new here! pls help

Post by ONEEYEMAN »

Hi,
You said that this is you second semester studying C++. So you should already have some exposure to the language.
Just do whatever David told you - get the sources and try to understand the minimal sample, then sizers. For the sizers there is a layout sample. So after going thru the tutorial check the sample by running it and check the code for it.

Good luck!
MagickPanda
Experienced Solver
Experienced Solver
Posts: 81
Joined: Wed Oct 19, 2016 1:41 pm

Re: hi! I'm new here! pls help

Post by MagickPanda »

imo visual basic or plain visual C++ is more friendly than wxwidgets for a beginner's calculater application. :lol:
nandakishore
Experienced Solver
Experienced Solver
Posts: 57
Joined: Wed Feb 25, 2015 2:09 pm
Location: Chennai, India

Re: hi! I'm new here! pls help

Post by nandakishore »

No Problem please go through the following tutorial learn about classes , objects and inheritance.
https://www.tutorialspoint.com/cplusplu ... bjects.htm
that is enough to start with wxWidgets.

Then open samples of wxWidgets in visual studio run the project called "minimal" by making it as "set as current project".
and obeserve the output.
Now start debugging by F10 analyse each and every line how it is making output.
Thats it.

PS:
Once you know how to debug patiently you will understand everything in this programming world.
Got a Problem???..No worry..Focus on Solution not on Problem :P
Post Reply