在将编辑控件做为旋转按钮的伙伴窗口后,不能设置Set buddy integer属性,一旦设置,则会提示Debug Assertion Failed!错误!对话框。
显示的情况如下:
File:dlgdata.cpp
Line:624
624行及前后左右的代码是:
void AFXAPI DDX_Control(CDataExchange* pDX, int nIDC, CWnd& rControl)
{
if (rControl.m_hWnd == NULL)    // not subclassed yet
{
ASSERT(!pDX->m_bSaveAndValidate); HWND hWndCtrl = pDX->PrepareCtrl(nIDC); if (!rControl.SubclassWindow(hWndCtrl))
{
ASSERT(FALSE);      
                            // possibly trying to subclass twice?
AfxThrowNotSupportedException();
}
#ifndef _AFX_NO_OCC_SUPPORT
else
{
if (pDX->m_pDlgWnd->m_hWnd != ::GetParent(rControl.m_hWnd))
rControl.AttachControlSite(pDX->m_pDlgWnd);
}
#endif //!_AFX_NO_OCC_SUPPORT }
}