Code:
				return (BOOL)CreateSolidBrush (GetSysColor(COLOR_MENU));
Really bad idea. You create a new brush before each return and never destroy the one created last time. This is called 'GDI resource leak'. Sooner or later you run off the GDI resources, and your app stops paint.

You have to create a brush once and return that one whenever it's needed.