关于状态栏的Create函数
BOOL CStatusBarDemoDlg::OnInitDialog(){
CDialog::OnInitDialog();
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
//创建状态栏,并新建2个子窗格
m_status.Create(this);
UINT nID[] = {ID_SEPARATOR, 100};
m_status.SetIndicators(nID, 2);
//移动状态栏到合适的位置
RECT rect = {0};
GetClientRect(&rect);
m_status.MoveWindow(0, rect.bottom - 20, rect.right - 10, 20, TRUE);
//将第二个格子的宽度设置为80
m_status.SetPaneInfo(0, 0, 0, rect.right - 10 - 80);
m_status.SetPaneInfo(1, 100, 0, 80);
return TRUE; // return TRUE unless you set the focus to a control
}
为什么把this换成GetParent()编译就出现Debug Assertion Failed,为什么不能替换呢,还有什么情况会出现Debug Assertion Failed