How To Become A WxWidgets Expert

From WxWiki
Jump to navigation Jump to search

wxMSW

To become a wxWidgets expert on Win32, I suggest:

1. Read the following book, cover-to-cover, to learn the wxWidgets framework.

Cross-Platform GUI Programming with wxWidgets
by Julian Smart, Kevin Hock, Stefan Csomor
744 pages, (c) 2005
http://www.amazon.com/exec/obidos/ASIN/0131473816

2. Read all the Section I chapters (the first 593 pages) of the following book to learn the basics of straight Win32.

Programming Windows, Fifth Edition
by Charles Petzold
1435 pages (but you should only read the first 593 pages), (c) 1998
http://www.amazon.com/exec/obidos/ASIN/157231995X

3. Read the following book, cover-to-cover, to become an expert at straight Win32.

Win32 Programming
by Brent Rector, Joseph Newcomer
1266 pages, (c) 1997
http://www.amazon.com/exec/obidos/ASIN/0201634929

4. Don't read but lookup the latest Win32 information in the following sources as needed.

Microsoft Visual C++ integrated help
http://www.google.com/
http://groups.google.com/

IMPORTANT! When reading the Petzold book or the Rector book, you should constantly remind yourself of the following:

  • These books are old.

These books pre-date Windows 2000, Windows XP and even Visual C++ 6.0. The compiler instructions may not work or make sense. They may describe old ways of doing things that are now obsoleted by newer APIs; Win32 has evolved somewhat in the past 7 years. They may over-emphasize things, like metafiles and palettes, that virtually nobody uses. Don't become overly excited with a certain Win32 API because it might be irrelevant.

  • Don't get bogged down in straight Win32 programming.

These books are written to teach you to how to write Win32 programs from scratch. That's not your goal, however; your goal is become an expert at understanding, debugging and fixing the already-working internals of the wxWidgets C++ framework. Some things are very important to the authors but aren't important to you because you are not a member of the exact audience that the author wrote the book for.

  • Imagine and look at code to see how wxWidgets wraps Win32 as you read.

To understand how wxWidgets rests on Win32, imagine how a C++ framework would fit on top of the features as you read. Imagine how classes might be constructed to wrap Win32 APIs. Think how C++ could be used to make the Win32 APIs easier and less error prone. Try to make the connection between straight Win32 and wxWidgets.

  • wxWidgets may do it differently.

For example, the Visual C++ dialog editor is extensively used in straight Win32 but wxWidgets ignores it, doing dialogs in source code or in XML. While you read, remind yourself that wxWidgets may have a whole different, cross-platform way of doing things that is different than the straight Win32 way.

This reading is optional. It is possible to be a wxWidgets expert, even though you've never read these books. These books are just one path to wxWidgets expertise.

If you read only one book, read the wxWidgets book. It is all up-to-date (published 2005) and directly applicable.

Once you've read the wxWidgets book and if you don't know anything about Win32, you may want to read the Petzold book. Knowing how to write straight Win32 programs in C will help you understand, debug and fix the internals of wxWidgets on the Win32 platform. The Petzold book is far easier to read than the Rector book.

Once you've read the wxWidgets book and if you know the basics about Win32 (either by experience or by reading the Petzold book), you may want to read the Rector book. Becoming a bona-fide expert at Win32 programs in C will make you a genuine expert at wxWidgets on the Win32 platform. The Rector book is meant as an exhaustive reference as well as a tutorial so it is harder to learn from than Petzold. It focuses on being complete so it is very dense, can over-emphasize complex but unimportant details and can be difficult.

Feel free to e-mail me at [email protected] with any questions or comments.