Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > C++ Advise

Reply
Thread Tools

C++ Advise

 
 
Allonii
Guest
Posts: n/a
 
      11-18-2008
Hello!

Iím new to this forum and in need of some advice.

I have learned the basics of java in the school as Iím studying
computer science. I would rather learn C++ though.
You can create windows applications, games, Linux applications, its
faster, more power etc.
And you get a nice .exe file when you compile in windows. (Which java
lacks)

I have already started to read an C++ book and Iím half way through,
but when it comes to GUI applications I have some
questions I would like to clear out.

As I understand it C++ doesnít provide a GUI library. But then we have
Windows API and Visualc++. So my questions are.


Windows API and VisualC++ they don't seem to be using the same
library? Windows API is it too old to be using today?
I know that in VisualC++ you can just copy and paste in the design
mode to get a button but in WinAPI its lines of code.

And another problem is that many C++ books don't even mention the GUI.
Don't even know if there are books about it.
Are there more libraries that one should be aware of?


In other hand C++ is an "old" language compared to java, C#, VB but
itís still is the most powerful one (my opinion).


Thanks in advance



 
Reply With Quote
 
 
 
 
maverik
Guest
Posts: n/a
 
      11-18-2008
On Nov 18, 2:53*pm, Allonii <(E-Mail Removed)> wrote:
> Hello!
>
> Iím new to this forum and in need of some advice.
>
> I have learned the basics of java in the school as Iím studying
> computer science. I would rather learn C++ though.
> You can create windows applications, games, Linux applications, its
> faster, more power etc.
> And you get a nice .exe file when you compile in windows. (Which java
> lacks)
>
> I have already started to read an C++ book and Iím half way through,
> but when it comes to GUI applications I have some
> questions I would like to clear out.
>
> As I understand it C++ doesnít provide a GUI library.


Yes, the language doesnít provide a GUI library.

> But then we have
> Windows API and Visualc++. So my questions are.


Please go to the comp.os.ms-windows.programmer.win32 or like this.

> Windows API and VisualC++ they don't seem to be using the same
> library? Windows API is it too old to be using today?


False. It depends on your task.

> I know that in VisualC++ you can just copy and paste in the design
> mode to get a button but in WinAPI its lines of code.
>
> And another problem is that many C++ books don't even mention the GUI.


Probably you need book about GUI programming (as I understand, for
Windows) not book about C++.

> In other hand C++ is an "old" language compared to java, C#, VB but
> itís still is the most powerful one (my opinion).


Hmmm. What's mean powerful? Again, it depends on your needs. Sometime
it is powerfull. Sometimes not.
 
Reply With Quote
 
 
 
 
Allonii
Guest
Posts: n/a
 
      11-18-2008
> False. It depends on your task.

Well my goal is atm to create simple windows application.

> Probably you need book about GUI programming (as I understand, for
> Windows) not book about C++.


But then a programming language is needed.
Do you recommend any GUI programming books for windows?

> Hmmm. What's mean powerful? Again, it depends on your needs. Sometime
> it is powerfull. Sometimes not.


my needs atm are for now win applications. The good part about C++ is
that you
can use it to alot of things. For example

>windows applications, games, Linux applications, its
>faster, more power etc.

 
Reply With Quote
 
osmium
Guest
Posts: n/a
 
      11-18-2008
"Allonii" wrote:

>> Probably you need book about GUI programming (as I understand, for
>> Windows) not book about C++.

>
> But then a programming language is needed.
> Do you recommend any GUI programming books for windows?


The bible for GUI on Windows is _Programming Windows_ by Charles Petzold, it
is very well written. There are several editions of this book which kind of
track the evolution of Windows. I have heard, but not verified, that some
of the most recent editions might not be what you want. Microsoft has tried
several things to make GUI "more manageable" , for lack of a better term.
The drag and drop you mention is part of this. The Petzold series, at least
until recently, has been for hard core programmers. Microsoft keeps
floundering around searching for a silver bullet, the latest experiment is
called .NET.


 
Reply With Quote
 
Allonii
Guest
Posts: n/a
 
      11-18-2008
> The bible for GUI on Windows is _Programming Windows_ by Charles Petzold, it
> is very well written. *There are several editions of this book which kind of
> track the evolution of Windows. *I have heard, but not verified, that some
> of the most recent editions might not be what you want. *Microsoft has tried
> several things to make GUI "more manageable" , for lack of a better term.
> The drag and drop you mention is part of this. *The Petzold series, at least
> until recently, has been for hard core programmers.


Thanks
But is the book up to date? its from 1998..

So in this case the Windows API is too advanced and the VisualC++
would be the "easy part".
But then do it use the same library? Because when you open an win API
code its not so easy to understand.


> Microsoft keeps floundering around searching for a silver bullet, the latest experiment is
> called .NET.


I understand. But in other hand the API is old?

 
Reply With Quote
 
Tim Slattery
Guest
Posts: n/a
 
      11-18-2008
Allonii <(E-Mail Removed)> wrote:


>Windows API and VisualC++ they don't seem to be using the same
>library? Windows API is it too old to be using today?
>I know that in VisualC++ you can just copy and paste in the design
>mode to get a button but in WinAPI its lines of code.


Visual C++ is Microsoft's implementation of the C++ language. The
Windows API comprises the functions built in to Windows that you
*must* use to write a Windows application. You're probably seeing code
written using MFC (Microsoft Foundation Classes), a set of classes
that comes with VC++ that wrap many of the API functions and make
writing Windows applications easier.

The proper place to ask questions about writing Windows apps is the
microsoft.public.vc.* hierarchy.

--
Tim Slattery
http://www.velocityreviews.com/forums/(E-Mail Removed)
http://members.cox.net/slatteryt
 
Reply With Quote
 
osmium
Guest
Posts: n/a
 
      11-18-2008
"Allonii" wrote:

>I understand. But in other hand the API is old?


The API evolves, yes its origins are old, 1987 or so.You seem to be hung up
on the age of things and equate newness with goodness. IMO there is often a
negative correlation. I suggest you transfer your questions to some of the
other newsgroups proposed. And drop the flame inducing talk of other
languages, such talk can only lead to tangents. And God knows, tangents are
the fresh meat of Usenet - they waste thousands of man hours per day. And,
yes, woman hours as well.


 
Reply With Quote
 
Andreas Duffner
Guest
Posts: n/a
 
      11-18-2008
Hello,

Allonii wrote:
> As I understand it C++ doesnít provide a GUI library. But then we have
> Windows API and Visualc++. So my questions are.


If you do not have a special reason to go for the Windows API, I'd
suggest that you learn some ClassLibrary, which is easier to use.
For example Qt ( http://trolltech.com/products/appdev ) or Gtk.
I am using Qt since years, sometimes developing under Windows,
sometimes under Linux, sometimes for the Mac.
I do not care. Qt does it all.
Example:
int main(int nArgCount, char** ppSzArgs)
{
QApplication app(nArgCount, ppszArgs);
QPushButton button("Press me");
connect(&button, SIGNAL(clicked() ),
&app, SLOT(quit() ) );
return app.exec();
}

This would create a button, complete with event loop, text, clickable.
And if you click it, it will send a message to the application
which will end the queue...
Same Sourcecode for all platforms.

Building ?
- qmake
- make
done.

Just a suggestion.
Andreas
 
Reply With Quote
 
Boris
Guest
Posts: n/a
 
      11-18-2008
On Tue, 18 Nov 2008 12:53:48 +0100, Allonii <(E-Mail Removed)> wrote:

> [...]Windows API and VisualC++ they don't seem to be using the same
> library? Windows API is it too old to be using today?
> I know that in VisualC++ you can just copy and paste in the design
> mode to get a button but in WinAPI its lines of code.
>
> And another problem is that many C++ books don't even mention the GUI.
> Don't even know if there are books about it.
> Are there more libraries that one should be aware of?


Another idea is to separate components and use the most suitable language
to implement them. If you need speed for example you could create a native
Windows DLL in C++. If you need a GUI you could use the .NET platform and
create a .NET executable (for example with C++/CLI if you prefer to use
something similar to C++) which can access the native Windows DLL. That
way you are not stuck in a certain language but can choose whatever is
best.

Boris
 
Reply With Quote
 
Tim Slattery
Guest
Posts: n/a
 
      11-18-2008
Pete Becker <(E-Mail Removed)> wrote:

>Only if "WIndows application" means windowing application, as distinct
>from "applicatton that runs on Windows". You don't need any of the
>Windows API to write a standard-conforming C++ application (i.e an
>application that runs from the command line).


Agreed, you can write a command-line app for windows using only
standard C++, no Windows API call involved. You do have to use the API
for a GUI application.

--
Tim Slattery
(E-Mail Removed)
http://members.cox.net/slatteryt
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
O.K. novice at work here!! Please advise.. =?Utf-8?B?Umljaw==?= Wireless Networking 8 12-24-2004 02:50 AM
advise on alachisoft Patrick imbault ASP .Net 0 11-15-2004 09:56 AM
Give me an advise! Arash Aghlara MCSD 6 06-15-2004 03:48 PM
Please Advise LSB MCSD 2 08-18-2003 12:08 PM
Need advise to implement VPN Awie Cisco 3 07-13-2003 02:45 AM



Advertisments