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 » About CExtPPVW < CExtGridWnd > Collapse All
Subject Author Date
tera t May 2, 2007 - 1:21 AM

Hello~~

I stick CExtPPVW CExtGridWnd on Dialog.

When I do Dialog-Create by a program, I seem to have to appoint GetDesktopWindow in pParentWnd.

Unless I go through such a procedure.
"Assert" appears by a print preview.

Why?

Technical Support May 3, 2007 - 1:48 PM

We failed to reproduce this problem with the ProfUIS_Controls sample. Could you provide us with a small test project demonstrating the problem?

We are recoding the printing and print preview at the moment. We will notify you later about this.



tera t May 7, 2007 - 1:30 AM

Hi

I cannot make a reproduction program.
Assert appears first of all at the following points.

-----------------------------------------------
int CView::OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message)
{
int nResult = CWnd::OnMouseActivate(pDesktopWnd, nHitTest, message);
if (nResult == MA_NOACTIVATE || nResult == MA_NOACTIVATEANDEAT)
return nResult; // frame does not want to activate

CFrameWnd* pParentFrame = GetParentFrame();
if (pParentFrame != NULL)
{
// eat it if this will cause activation
>>>>>>>>ASSERT(pParentFrame == pDesktopWnd || pDesktopWnd->IsChild(pParentFrame));
-----------------------------------------------

Please answer it if I seem to understand a cause.
It moves commonly if I do normal how to make.

Thank You

Technical Support May 7, 2007 - 11:31 AM

Please contact us via email at support@prof-uis.com. We have a solution that should fix this problem.

tera t May 9, 2007 - 1:47 AM

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. (-o-;)

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:25 AM

We are sorry for the delay with this reply. 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;
}

tera t May 10, 2007 - 2:46 AM

Hi

Were you able to reproduce the Assert situation?

Thank