A Journey 2 Eternity

Archive for April 2008

(01) Always write optimize and good code in WM_PAINT, WM_MOUSEMOVE and WM_CTLCOLOR event handler. In these three event handlers is always called and it’s tough to debug if any bug exists.

(02) When you got the device context by GetDC() api, you must make sure to release the device context by ReleaseDC() api after painting.

Tags:

When you want a class, who will dynamically created by CreateObject(), then you must have a default constructor. Otherwise you got “Compiler Error C2512 – no appropriate default constructor available”.

When you made a class child who is inherit from class parent and if parent class has some forward declaration then you received a “Compiler Error C2512 – missing type specifier”.

The solution is remove the forward declaration from the parent class header.

Tags:

Pages

Categories

April 2008
M T W T F S S
« Mar   Aug »
 123456
78910111213
14151617181920
21222324252627
282930  

Blog Stats

  • 27,085 hits