问题描述
我正在VS2008中编写一个SDI媒体播放器.在项目中,我使用了一个CDialogBar.它在调试模式下效果很好,但在发布模式下崩溃.
调用creat()函数时会发生问题:
int CMainFrame :: OnCreate(LPCREATESTRUCT lpCreateStruct)
{
如果(CFrameWnd :: OnCreate(lpCreateStruct)== -1)
返回-1;
如果(!m_playCtrlBar.Create(this,IDD_DIALOG_PLAY_CTRL_BAR,CBRS_ALIGN_BOTTOM | WS_VISIBLE | WS_CHILD,IDD_DIALOG_PLAY_CTRL_BAR))
{
TRACE0(无法创建对话框栏\ n");
返回-1; //无法创建
}
RecalcLayout();
返回0;
}
CMainFrame派生自CFrameWnd.
有人可以帮我吗?
I am writting a SDI media player in VS2008.In the project,I use a CDialogBar.It works very well in debug mode,but crashs in release mode.
Problem happens when creat() function is called:
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
if (!m_playCtrlBar.Create(this, IDD_DIALOG_PLAY_CTRL_BAR, CBRS_ALIGN_BOTTOM|WS_VISIBLE|WS_CHILD, IDD_DIALOG_PLAY_CTRL_BAR))
{
TRACE0("Failed to create dialog bar\n");
return -1; // fail to create
}
RecalcLayout();
return 0;
}
CMainFrame is derived from CFrameWnd.
Does anyone can help me?
推荐答案
这篇关于CDialogBar在发布模式下创建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!