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 General Discussion » CExtPropertyGrid right mouse button click bug report Collapse All
Subject Author Date
Nathan Explosions Jun 5, 2007 - 8:03 AM

Greetings again.

I’m sorry to say this, but I have found a bug, which doesn’t seem to be reported yet.

The bug results in an exception, which eventually leads to application crash if user have clicked right mouse button on the empty space at the bottom of CExtPropertyGrid (take a look at this image, please: http://rapidshare.com/files/35375788/bug.jpg.html).

This bug can be easily reproduced in PropertyGrid sample, although you may need to resize the window a bit to easily find the empty space.

P.S. I am using trial version of Prof-UIS library v2.70.

Nathan Explosions Jun 6, 2007 - 11:00 PM

Thank you very much.

Technical Support Jun 6, 2007 - 10:42 AM

Thank you for reporting the bug. To fix it, please add two lines of code to the following method:

void CExtPropertyGridCtrl::OnPgcContextMenuTrack(
      CWnd * pWndHit,
      CPoint ptScreen,
      CExtGridHitTestInfo * pHtInfo, // can be NULL
      CExtPropertyItem * pPropertyItem, // can be NULL
      CExtPropertyGridWnd * pPGW // can be NULL
      )
{
      ASSERT_VALID( this );
      ASSERT( GetSafeHwnd() != NULL );
      pWndHit;
      if( pPropertyItem == NULL )   ///// THIS LINE ADDED
            return;                 ///// THIS LINE ADDED
      if( ! pPropertyItem->OnInputEnabledGet( ( pPGW != NULL ) ? pPGW->m_bInputEnabledNestedFlags : false ) )
            return;
      . . .
The CExtPropertyGridCtrl::OnPgcContextMenuTrack() virtual method is invoked to track the context menu over the property grid control. By default, the CExtPropertyGridCtrl class tracks the context menu over the property items only. But it is possible to override it and track some specific context menu over empty area. We simply forgot to compare the pPropertyItem parameter with NULL.