WinAPI Programming

Introductory winapi (win32api) programming source code and reference

This website is intended to act as an introductory resource and as a quick reference for winapi (win32) C++ programming . Since the emphasis is on C++ any code presented here has been written to be compiled exclusively as C++ and is not written, simple as it is, to be compiled as C, too The code has been written for and tested with the excellent MinGW (Dev-Cpp) and microsoft's compilers(vc7 and vc8) to ensure that it should work without further modifications. While the code will probably compile unchanged on other compilers, this may not, in practice, be the case; feel free to drop me an email if you have any problems compiling the source using your favourite compiler.

If you have any suggestions, good or bad, about this site or the sample code then feel free to contact . Your comments are appreciated.

Jun 2006

Images back

After some good advice I've decided to reinstate the images of the various examples as thumbnails within the main content which, I hope, will make it easier to find or recognise particular examples at a glance.

Apr 2006

Change of tack

I've decided to drop explicit support for Borland's bcc55 command line tools. This doesn't mean that the samples presented elsewhere in this site won't compile with it, only that I won't be spending any more time ensuring that they do. My reasons for this change are twofold - firstly, bcc55 is getting old and is not as standards compliant as other 'free' compilers (MinGW and msvc-express, for example) and secondly, because of the withdrawal by Borland, of their free CBuilderX personal edition from general distribution. The latter is important because CBuilderX came with a later version of bcc (v5.6.4), which made ensuring compatibility and continuity worthwhile, which is now no longer the case. If you are currently using bcc55, I would suggest switching to MinGW or msvc-express. The latter has become a more attractive prospect, particularly for the hobbyist, due to Microsoft's recent decision to make it free forever.

Jan 2006

New Site - some changes

FoosYerDoos has moved and while the original FoosYerDoos website will still be available, no further updates will be made to it. In moving the website I have taken the opportunity to revise the source code and refresh the site layout both of which, I hope, will be an improvement over what has gone before. In its original manifestation in its old home, this website presented some code that could be compiled as either C or C++ and, unfortunately, in an attempt to make it both ended up being neither. As wiser individuals than me have often stated, "There is no such language as c/c++". Accordingly, I have rewritten the code so that it is all explicitly C++, for example by replacing C-style casting with proper, type-safe C++ casting. This has resulted in trivial code appearing, at first glance anyway, to be more complicated than it arguably should be but I nonetheless felt it proper to present it this way.

I've pretty much stuck with the same presentation format as before - creating ui(user interface) elements to provide a grounding in the intrinsic controls(widgets) available for use with the winapi and moving on to simple C++ wrapper classes for those same ui elements. What has changed is how that information is presented. I chose to remove the images and make them separate from the main content. This makes the site simpler to load, particularly for those with slower connections and, hopefully, easier to read and reference. This site is written to comply with xhtml 1.1 standards rather than html 4.0 as used in the original site.

Not everything that was on the old site has been redone yet; it's a work in progress and, as a hobbyist, I'd much rather fiddle about with coding than fiddle around with presenting it. Some of the old stuff may never be reworked here but anything absent from here should still be available, for the time being anyway, over there.