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 » Unexpected OnLButtonUp message send to window under popup menu Collapse All
Subject Author Date
Krzysztof Janik Dec 8, 2006 - 4:19 AM

After update may ProfUis 2.5.3 to 2.6.2 unfortunately I have discovered that windows under popup menu is receiving OnLButtonUp message after item selection in this popup menu what does not happen in my older ProfUis version.
It causes that window which is under this popup menu first perform OnLButtonUp message and after that is performed command message handling selected item in menu. What can completely change expected application reaction.

Please tell me what can I do to prevent this.

Technical Support Dec 9, 2006 - 11:48 AM

Thank you for reporting this issue. Please update the source code for the CExtPopupMenuSite::_Done() method in the ..\Prof-UIS\Src\ExtPopupMenuWnd.cpp file to fix this:

void CExtPopupMenuSite::_Done()
{
 ASSERT( ! m_bShutdownMode );
 if( m_pWndToolTip != NULL )
     m_pWndToolTip->Hide();
 m_bShutdownMode = true;
 m_pWndCapture = NULL;
 m_pWndAnimation = NULL;
 m_lpnResultCmdID = NULL;
 if( m_pTopMenu != NULL )
    {
     ASSERT( m_pTopMenu->m_bTopLevel );
     if( ! m_pTopMenu->_IsFadeOutAnimation() )
        {
         VERIFY( m_pTopMenu->_BuildItems( NULL, true ) );
         if(     m_pTopMenu->GetSafeHwnd() != NULL
                &&    ::IsWindow( m_pTopMenu->GetSafeHwnd() )
                )
            {
             CExtControlBar::stat_SetMessageString(
                 m_pTopMenu->GetOwner()
                    );
             m_pTopMenu->DestroyWindow();
             MSG msg;
             while( ::PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE ) )
                {
                 if( WM_MOUSEFIRST <= msg.message && msg.message <= WM_MOUSELAST )
                    {
                        ::PeekMessage( &msg, NULL, msg.message, msg.message, PM_REMOVE );
                     continue;
                    }
                 if( ! ::AfxGetThread()->PumpMessage() )
                     break;
                }
            }
         ASSERT( m_pTopMenu->GetSafeHwnd() == NULL );
         delete m_pTopMenu;
        }
     m_pTopMenu = NULL;
    }
 _Hook( false );
 __VPC_VERIFY_0;
 m_bShutdownMode = false;
}