Is wx the same as c programming? Topic is solved

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
Post Reply
ding
Experienced Solver
Experienced Solver
Posts: 70
Joined: Wed Jan 04, 2006 7:55 am
Location: Singapore

Is wx the same as c programming?

Post by ding »

Can I use c programming in wx programming?
If it doesn't work, does that mean that i have to use a different if, else or while loop and for wx programming?
i am new to this
upCASE
Moderator
Moderator
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Re: Is wx the same as c programming?

Post by upCASE »

Hi!
ding wrote:Can I use c programming in wx programming?
If it doesn't work, does that mean that i have to use a different if, else or while loop and for wx programming?
i am new to this
It's not only a "can", but mostly a "must" for general language constructs and syntax.

wxWidgets is a set of C++ classes that wrap up platform specific APIs (like the Win32 API, GTK, etc.) for easier usage and being able to have the same code to be compiled on multiple platforms. As C is a subset of C++ (please forgive me Mister Bjarne Stroustrup), you can and will use basic stuff like if - else blocks and loops like you know them from C. They are no different. Every valid C program would have to compilable by a C++ compiler too.

The best thing to do, if you don't know C++, is to learn it first, or at least the general concepts of OO programming. If you programed in Java before, C++ is pretty easy (no Mister Stroustrup, I'm not comparing Java and C++ :) ). Have a look at the samples that come with wxWidgets.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
ding
Experienced Solver
Experienced Solver
Posts: 70
Joined: Wed Jan 04, 2006 7:55 am
Location: Singapore

PLease help

Post by ding »

Is wx the same c programming? I have knowledge of c and c++ program

But i just couldn't seen to understand wx, it is just like a new language that r totally different from c and c++ which is what devcpp design
ding
Experienced Solver
Experienced Solver
Posts: 70
Joined: Wed Jan 04, 2006 7:55 am
Location: Singapore

THis quoted by UPcase

Post by ding »

what does it maen by set of C++ classes that wrap up platform specific APIs (like the Win32 API, GTK, etc.)
upCASE
Moderator
Moderator
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Re: PLease help

Post by upCASE »

ding wrote:Is wx the same c programming? I have knowledge of c and c++ program

But i just couldn't seen to understand wx, it is just like a new language that r totally different from c and c++ which is what devcpp design
???
You know about C and C++, you know what a class is, ok. wxWidgets is a library that consist of many classes you can use, in how far is that a problem?

I can't give you hints and tips about wxDevcpp as I don't use it, but there are others who can. Just post a proper question. :)

wxWidgets is "the same c programming" just as C++ is "the same c programming".
ding wrote:what does it maen by set of C++ classes that wrap up platform specific APIs (like the Win32 API, GTK, etc.)
On each platform (Windows, Linux, Mac, etc.) special APIs exist that expose functions that can be used to do stuff with the system itself. For example there are functions to create a window, handle events, show dialogs etc. But these functions aren't the same on all platforms. wxWidgets abstracts these functions by wrapping them in classes that have the same API on all platforms and call the platform specific API internaly. You don't see any special functions which would be platform specific, as long as you only use wxWidgets.

I really don't know how to help you here, as I don't understand what you want to know...
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
Post Reply