Re: Print preview beyond the regular framework



So did you single-step into AfxGetTopLevelFrame and see what it is returning?

Part of the problem I see in the new framework is that it makes a huge number of
unsustainable assumptions about reality, more so than the old framework made.
joe

On Sun, 20 Mar 2011 13:24:45 +0100, Hans-J. Ude <news@xxxxxxxxxxxxxxxxxxxx> wrote:

I went a little deeper in it and compared it step by step to regular
SDI dummy application. The first significant difference is here:

[MFC]
void CFrameWndEx::OnSetPreviewMode(BOOL bPreview, CPrintPreviewState*
pState)
{
ASSERT_VALID(this);

CFrameWndEx* pMainFrame = DYNAMIC_DOWNCAST(CFrameWndEx,
AFXGetTopLevelFrame(this));

if (pMainFrame != NULL)
{
pMainFrame->SetPrintPreviewFrame(bPreview ? this : NULL);
}
[/MFC]

where pMainFrame is NULL in my app but not in the dummy SDI. But no
solution yet.

Hans
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.