This is a weird one... not sure why this is happening.
In my .h, in my class, in the public section, I have the following:
in my class constructor, I have:
Code:
useme = new CButton[MAX_WARP_TYPES];
later in my program, I have:
Code:
void myClass::createScreenConfig(CString path,int num)
{
// ....
useme[0].Create(_T(""),WS_CHILD|WS_VISIBLE|BS_CHECKBOX,
CRect(rect.left+leftSpace, rect.top+topAdjust+fieldHeight*0,rect.right-3,rect.top+30),
this,1500);
}
but this causes the following assert from wincore.cpp to fail:
ASSERT(pWnd->m_hWnd == NULL); // only do once
However, if I put the useme = new CButton[MAX_WARP_TYPES];
right in the function, it works correctly. What's going on?