在一个对话框的按钮响应消息处理函数中有:// TODO: Add your command handler code here
CWriteFrm* pFrame = new CWriteFrm;
// create and load the frame with its resources pFrame->LoadFrame(IDR_MAINFRAME,
WS_OVERLAPPEDWINDOW|FWS_ADDTOTITLE, NULL,
NULL); // The one and only window has been initialized, so show and update it.
pFrame->ShowWindow(SW_SHOW);
pFrame->UpdateWindow();CWriteFrm是自定义的,在DEBUG中可以动态创建框架窗口,而在RELEASE中不能创建框架窗口,没有任何提示,为什么?
CWriteFrm* pFrame = new CWriteFrm;
// create and load the frame with its resources pFrame->LoadFrame(IDR_MAINFRAME,
WS_OVERLAPPEDWINDOW|FWS_ADDTOTITLE, NULL,
NULL); // The one and only window has been initialized, so show and update it.
pFrame->ShowWindow(SW_SHOW);
pFrame->UpdateWindow();CWriteFrm是自定义的,在DEBUG中可以动态创建框架窗口,而在RELEASE中不能创建框架窗口,没有任何提示,为什么?
你的CWriteFrm是不是派生自CFrameWnd呀?
------------------
void CTestDialog::OnButton1()
{
// TODO: Add your control notification handler code here
CTestFrame *pFrame=new CTestFrame;
pFrame->LoadFrame(IDR_MAINFRAME); pFrame->ShowWindow(SW_SHOW);
pFrame->UpdateWindow();}-----------------
class CTestFrame : public CFrameWnd
{
...
};----------
[email protected]
static UINT indicators[] =
{
ID_SEPARATOR, // status line indicator
ID_INDICATOR_CAPS,
ID_INDICATOR_NUM,
ID_INDICATOR_SCRL,
};if (!m_wndStatusBar.Create(this) ||
!m_wndStatusBar.SetIndicators(indicators,
sizeof(indicators)/sizeof(UINT)))
{
TRACE0("Failed to create status bar\n");
return -1; // fail to create
}