在 CMainFrame::OnCreate 中創建 CDialogBar 時觸發 Debug Assertion,通常因資源 ID 未定義或創建參數錯誤。
IDD_FLOAT_DLG?打開 Resource.h 搜索,或資源視圖「Dialog」節點下確認。if (!m_myDlg.Create(this, IDD_FLOAT_DLG,
CBRS_TOP | CBRS_HIDE_INPLACE, IDD_FLOAT_DLG)) {
TRACE0("Failed to create dialog bar");
return -1;
}
m_myDlg.EnableDocking(CBRS_ALIGN_TOP);
EnableDocking(CBRS_ALIGN_TOP);
DockControlBar(&m_myDlg);
IDD_FLOAT_DLG 拼寫錯誤或未包含 resource.h。Create 內部 ASSERT 失敗。修復資源後重新編譯即可通過。