CodeProject.com is a great web community with plenty of development resources for primarily Windows technologies. However, in the recent years the content has expanded to include all types of mobile platforms as well. The community is friendly and generally accepting, just don't ask them to answer your homework questions. There are quite a few articles on the site, so you may have to search for what you are looking for. The grading seems to be relatively accurate related to the quality and topic of the content.
I have posted a number of articles at Code Project primarily related to Windows development with C++. Once you reach the article, you can download the source for the programs if you have a membership to CodeProject.com. Hopefully I will bring a copy of the resources to this site as well. However, my primary focus at this point is building new content for CodeOfTheDamned.
I have developed and present to you, a complete 2D game that utilizes functionality up to DirectX 8.0. The game is similar to a classic that can be spelled with the letters 'T' 'E' 'R' 'I' and 'S'. I originally implemented my version of this game in 2002. Because of copyright infringement and pressure from the lawyers at a company whose name can also be spelled with the letters 'T' 'E' 'R' 'I' and 'S', Code Project was forced to remove the original article from its site in December of 2007. However, because of US Copyright law I am able rename my game "Quadrino" and now it can return to Code Project.
In reading the forums and answering the questions, I have found that many beginners would like to learn the fundamental concepts of painting in WIN32 programs. Developing applications for windows can be challenging and frustrating. it can also be rewarding if you know some of the basic techniques that are required to take advantage of the WIN32 operating system. This tutorial is for beginners, and will cover the basic techniques and knowledge required to get started with painting in WIN32.
Many developers are comfortable with obtaining a handle to a device context (DC) and painting to it. However there is probably alot of confusion in how all of the parts to windows painting are structured. Confusion in what the different DCs are good for, and how each of these DCs can be used effectively. This article will describe in detail, how the different parts of the WIN32 paint system are combined and how to use the common and device DCs in the paint system. The memory and metafile DCs will be ignored in this article.
Eons ago in computer time, I left-off with an article called Guide to Win32 Paint for Intermediates. That article described the basics of the
WM_PAINT message, as well as how to use most of the different types of Win32 Device Contexts (DC). This article will describe the Memory DC. The Metafile DC will still be ignored in this article.
Regions are a resource in windows that are very useful. They are device independent, which means that a device context (DC) is not need to create or use one. However, there are many functions in the WIN32 GDI that require a region.
Some of the useful places for a region are:
- Update Region, Paint
- Clipping, Paint
- Hit Testing
- Define window shape, Irregular Shaped Windows
Many of the functions that relate to regions are very simple, and need very little explanation, in fact the definition from MSDN is adequate enough to explain these functions. However, some of the functions are a little more difficult to understand and master, therefore extra details have been added to explain these functions. A few diagrams may accompany the explanation as well.
Clipping is a tool that can be very useful when painting complex user interfaces for any type of computer graphics display. There are two types of clipping in the subject of computer graphics, clipping to improve performance, and clipping for effect. This article will focus on how clipping is implemented in the WIN32 API, specifically within device contexts (DC)s.
While some of the discussion in this tutorial may only be of interest to developers who seek advanced knowledge on the WIN32 clipping regions, the bulk of this guide is set at an intermediate level. Also, to know many of the secrets behind the structure and organization of the clipping regions will allow you to make design decisions that will allow you to more readily exploit these features.
This article will describe the challenges and difficulties that I worked through to arrive at the visual effect I was aiming towards (however, I will not focus on the effect in the previous article, more about this later). I found there are many samples for how to use both ::GradientFill and ::AlphaBlend. Even if the examples on MSDN show all of the capabilities of ::GdiAlphaBlend, the results displayed on the screen do not provide any new insight on how the function works. All of the effects could be recreated with calls to ::Rectangle and ::GradientFill. The samples are also performed on a white background. I was confused by the results of my first attempts of alpha-blending when I moved away from the plain white background.
While looking for examples for the previous two functions, I discovered there is only one other documented function exported from this library, ::TransparentBlt. Therefore, I decided to describe all three of these functions and cover the entire DLL for this article.
While thinking of possible demonstrations to apply these functions toward, I began to see how useful and flexible these functions are, even though they appear quite rigid and simple. Ultimately, this article is about Image Composition. With the help of the functions in MsImg32.dll applied in some creative ways, dynamically generated images that look great are only a few lines of code away, even written in C++ and using the Win32 API.
Windows Template Library (WTL)
This is my favorite framework for developing windows applications. I am comfortable with templates, I think Microsoft did a fantastic job with ATL, and this produces a very minimal object-oriented structure for your windows applications. Unfortunately, it seems that WTL is not used by many anymore. However, if you need to perform Win32 API Windows development, I would still recommend this framework.
I have written a new message loop class called CGameLoop that derives from CMessageLoop, and is more suitable for game programming with WTL window support.
Design and Architecture
I have been developing user level applications for Windows CE based devices for about 5 years now. The quality of the development tools for this platform has improved considerably in those 5 years. However, the tool quality still pales in comparison to what is available to a Windows Desktop developer. A debugger exists for these mobile devices, however it is not always possible to use the debugger. Many times when debugging an application a developer will be reduced to using MessageBox or writing data to a log file.
For some of the projects that I have helped develop, the developers have created a series of C pre-processor macros for instrumenting their code. These macros can be selectively compiled into the application when instrumentation reporting is desired. Normally the output is written to a log file. Typically a macro is created to indicate when a function is entered, when it is left, the input parameters and the return values, and even reporting macros for certain checkpoints in the code.