开发者

Visual C++ for a console programmer

I know quite开发者_开发问答 a bit of C++ programming, I know how to use classes, pointers, arrays loops etc. I mainly develop games with C++ which does not require you to know too much visual programming unless you want to make some editor, but now I want to start learning Visual programming with C++ so I wanted to start with visual studio 2010, the problem is that every time I look MS documentation is kind of hard for me to follow it. So my question is, what's a good resource; book or videos, to start learning Visual C++? I don't want something about console programming, what I want is about visual programming with Visual C++. Thanks.


It's a very broad question so I'll try to be as unspecific as possible. For C++ you have a few choices for interface libraries, you'll have to do some research and decide which one you like most:

  • plain Windows API, fun to poke around but masochistic to say the least
  • MFC - mostly an OOP wrapper around the Windows API
  • WTL is what I would call MFC Lite, another OOP wrapper but very lightweight (alas unsupported by MS)
  • Qt is nice if you want to go platform independent but I personally find it very...bloated. Unlike the first few it's not really built around the Windows specifics but a more general approach, very much thought through.

If you decide to stay in the Windows world, I really recommend Programming Windows by Charles Petzold. It saved me countless times.


For starters on Windows programming and Visual C++, MFC is the best bet. May not be the best framework, but reasoably efficeint and (quite) well designed. As @pezcode mentioned, it is just thin wrapper around Windows API, so there is no or little overhead (as far as "windows" are concerned, and not COM/Sockets/Exception etc.).

More on that MFC is well integrated with VC/VS to do command/message routing right from Resource Editor to the code, which none of the other framework would provide.

Go for it - there are plenty of articles/documentation/sample-code available. DONT dove into Doc/View!


I take it that you want to learn how to design graphical-user-interfaces (GUI). So, instead of mucking around with MFC (which is what I think you meant by "visual C++") and the like, I'd recommend learning Qt.

Note: Visual C++ is the name of Microsoft's C++ compiler. It can be used to create console as well as GUI applications using MS API as well as GUIs with Qt.


If you want to build visual interfaces using C++, you might want to consider Qt. It's a very good framework for building GUIs and it targets several platforms.

Check the demos to see if that's what you really want.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜