First Differences

There has never been a photographer who hasn’t asked or been asked:

So what camera do you use, and what kind of lens?

Yet there’s never been a sculptor asked:

So what chisel do your use, and what kind of hammer?

This is the first and obvious difference. As a principal it means that often what we know first is the major parameter that distinguishes one from another. Often, but not always. That what you know about a company is what you first know about them.

Flickering ATL

ATL controls are created by default with the CS_HREDRAW and CS_VREDRAW class styles. These styles cause the entire window to be redrawn when the window is resized.
Remove the CS_HREDRAW and CS_VREDRAW styles from the window by overriding the GetWndClassInfo() function. Add the following function to your CComControl-derived class:

static CWndClassInfo& GetWndClassInfo()
{
static CWndClassInfo wc = {{ sizeof(WNDCLASSEX), 0, StartWindowProc,
0, 0, 0, 0, 0, (HBRUSH)(COLOR_WINDOW+1), 0, “MyControlClass”, 0 },
NULL, NULL, IDC_ARROW, TRUE, 0, _T(“”)};
return wc;
}