Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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?
Posted
Comments
Niklas L 31-Aug-10 0:57am    
What evidence do you have for the Create call to fail? Please post an update.

1 solution

I would recommend to compile in release mode with debug infos so you can debug the release mode, too.

Probably you know that variables in debug mode are initialized with zero/null automatically, whereas they have random values in release mode.

Cheers
Uwe
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900