You need to use the debugger. The most common case for your error, is that the control isnt correctly connected with some resource in the rc and wiward.
ASSERT(::IsWindow(m_hWnd)):
means that this object
hasnt a window handle. So debug to find the object which crashes on this and inspect the code. Often some rewritten code lead to that.