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 » CExtControlBar docking Collapse All
Subject Author Date
Denis Konovalov Nov 27, 2007 - 12:21 AM

Hello.

I implement provided code (for proportional resize) and turn on docking style studio 2005. I have another CExtControlBar, docked to main window.
Proportional bar can be docked to any side of main window and to second control bar.
On my computer it works normal, but on another computer i can’t dock this bar to second control bar.
Why?

Using other docking style works on all computers, but confuse user (thin border while dragging).

Thanks.

Technical Support Nov 27, 2007 - 5:33 AM

We confirm this problem can occur with the CMyBarResizableBar class we mentioned earlier. But it should not happen with this version of that class:

      class CMyBarResizableBar : public CExtControlBar
      {
      public:
            CSize m_sizeInitialFloatingAndProportion;
            CMyBarResizableBar()
                  : m_sizeInitialFloatingAndProportion( 150, 100 )
            {
                  SetInitDesiredSizeFloating( m_sizeInitialFloatingAndProportion );
            }
            virtual bool IsFixedMode() const
            {
                  if( ::GetCapture() == m_hWnd )
                        return false;
                  return ( IsFloating() && LPVOID(_DraggingGetBar()) != LPVOID(this) ) ? true : false;
            }
            virtual CSize CalcDynamicLayout(
                  int nLength,
                  DWORD nMode
                  )
            {
                  CSize _size = CExtControlBar::CalcDynamicLayout( nLength, nMode );
                  if( IsFloating() )
                  {
                        if( nMode & LM_LENGTHY )
                        {
                              _size.cx =
                                    ::MulDiv(
                                          _size.cy,
                                          m_sizeInitialFloatingAndProportion.cx,
                                          m_sizeInitialFloatingAndProportion.cy
                                          );
                        }
                        else
                        {
                              _size.cy =
                                    ::MulDiv(
                                          _size.cx,
                                          m_sizeInitialFloatingAndProportion.cy,
                                          m_sizeInitialFloatingAndProportion.cx
                                          );
                        }
                  }
                  return _size;
            }
      };

Denis Konovalov Nov 27, 2007 - 3:09 AM

Docking markers doesn’t appears on docked CExtControlBar. It appears only if make it floating and re-dock at first run. After reloading application all is OK. (version 2.53). Is it a bug?