Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Give me an answer Collapse All
Subject Author Date
tera t May 10, 2007 - 6:01 PM

Hi

When I am for "Debug", this Assert occurs.
Please move to a print preview screen.
With a mouse, please click a preview screen
Assert occurs.

ttp://profuis0.tripod.com/20070509/image01.jpg
ttp://profuis0.tripod.com/20070509/pptest3.lzh

[ A cause of an error ]
In SDI Frame, I make a dialog.
It seems to be not good when I set up a preview in the dialog.

Technical Support May 11, 2007 - 7:26 AM

Thank you for reporting the problem. You can fix it by updating the source code of the CExtPPVW_HostWnd::OnMouseActivate() method:

int CExtPPVW_HostWnd::OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message)
{
      ASSERT_VALID( this );
int nResult = CWnd::OnMouseActivate( pDesktopWnd, nHitTest, message );
      if( nResult == MA_NOACTIVATE || nResult == MA_NOACTIVATEANDEAT )
            return nResult;
CFrameWnd * pParentFrame = NULL;
CWnd * pParentWnd = GetParent();
      for( ; pParentWnd != NULL; pParentWnd = pParentWnd->GetParent() )
      {
            if( pParentWnd->IsFrameWnd() )
            {
                  pParentFrame = STATIC_DOWNCAST( CFrameWnd, pParentWnd );
                  break;
            }
            if( ( pParentWnd->GetStyle() & WS_CHILD ) == 0 )
                  break;
      }
      if( pParentFrame != NULL )
      {
            CView * pView = pParentFrame->GetActiveView();
            HWND hWndFocus = ::GetFocus();
            if(         pView == this
                  &&    m_hWnd != hWndFocus
                  &&    ( ! ::IsChild( m_hWnd, hWndFocus ) )
                  )
                  OnActivateView( TRUE, this, this );
            else
                  pParentFrame->SetActiveView( this );
      }
      return nResult;
}