For those of you who also code in JAVA*:
Does anyone know of anything in C++ that is at all like paintComponent or the Graphics class? HALP!


*ROFLwaffles to those who do

Member Avatar for iamthwee

>Does anyone know of anything in C++ that is at all like paintComponent or the Graphics class

Yes it is called using a third party graphics library.

It depends on the compiler and the operating system. You can use an os-independent compiler such as QT which as gui support for *nix, MS-Windows and MAC (others I don't know about). Or you can use os-specific libraries such as win32 api function and MFC class for MS-Windows. There are libraries for *nix too but I forget what they are.

I think that is one reason why java is supposed to be platform independent. As far as I know there really are no similar c++ compilers that produce platform independent code like that. Microsoft .NET Visual Studio is headed that way but may be several years away from achieving that goal.

>Does anyone know of anything in C++ that is at all like paintComponent or the Graphics class

Yes it is called using a third party graphics library.

Know of any??? Pretty please with easy-to-read, exception-handling code and a cherry on top??? I've been looking for ages, can't find any that work.:(

Thanks for the help.

>>can't find any that work
you didn't look very hard. Re-read my previous post because I gave you two. You will not find a function names "paintComponent" so no point looking for it. If you want to use c++ for gui then forget what you learning in java and learn the c/c++ way to do it.

Ooops, Ancient Dragon, my bad. Didn't see those. I pulled a noob.:icon_confused:
thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.