16,548
社区成员




if (pOccManager != NULL)
{
pOccManager->PostCreateDialog(&occDialogInfo);
if (hWnd != NULL)
{
SetOccDialogInfo(NULL);
}
}
CPrintFrame *frame = new CPrintFrame();
frame->Create(_T("打印预览"), this, TRUE);
BOOL CPrintFrame::Create( CString window_text, CDialog* callback_window,BOOL b_preview )
{
ASSERT( callback_window );
m_p_caller_dlg = callback_window;
BOOL res = this->Create(NULL,window_text,WS_CAPTION|WS_SYSMENU|WS_THICKFRAME|WS_MINIMIZEBOX|WS_MAXIMIZEBOX,CRect(0,0,0,0));
//设置窗口的大小
CRect rect;
this->GetDesktopWindow()->GetWindowRect(&rect);
rect.DeflateRect(100,100);
this->MoveWindow(&rect);
if( b_preview )
{
this->m_p_view->OnMyPrintPreview(this);
}
else
{
//this->m_p_view->OnMyPrint();
}
return res;
}
debug下可以正常调用并进入this->m_p_view->OnMyPrintPreview(this);但是在release模式下,这里就跳出了,进的不是自定义的类,跑到系统类dlgcore里面去了,为啥会这样呀。