Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - [Closed] Question: Show / Hide Logic
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[Closed] Question: Show / Hide Logic

 Post Reply Post Reply
Author
Message
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post Topic: [Closed] Question: Show / Hide Logic
    Posted: 22 October 2005 at 5:04am

Imagine a standard MDI application with a single docking window where the docking window (the CodeJock calendar) is displayed and selected:

The question: as the calendar is active, what should you user do to hide it? I've not really come up with a good solution other than:

* Add a button next to the pin to hide (not [X] close) the window.
* If you click on the title bar (where the calendar text and pin is displayed) then the window should hide itself.

But what's the advice from those who know? Clicking in the MDI views is not an option.

Thanks for the excellent software,



Edited by Simon HB9DRV
Simon HB9DRV
Back to Top
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post Posted: 25 October 2005 at 3:08am

FWIW I have looked at CXTPDockingPaneAutoHidePanel::OnLButtonDown and changed the logic so that clicking on the tab of a selected pane which has focus results in the pane being closed, this way I have acheived what I want.

void CXTPDockingPaneAutoHidePanel::OnLButtonDown(UINT /*nFlags*/, CPoint point)
{
 CXTPDockingPane* pPane = HitTest(point);
 if (pPane)
 {
  if (m_pActiveWnd && m_pActiveWnd->m_pPane->GetSelected() == pPane)
  {
#pragma message ("*** OnLButtonDown changed ++" __FILE__)
   //
   // New - if focus then hide.
   //
   if (pPane->IsFocus())
   {
    CloseActiveWindow();
    KillTimer(TID_SLIDEIN);
   }
   else
    pPane->SetFocus();

   //
   // Original.
   //
   // pPane->SetFocus();
#pragma message ("*** OnLButtonDown changed --" __FILE__)

  } else
  {
   CloseActiveWindow();
   ShowPane(pPane);
  }
 }
}

Simon HB9DRV
Back to Top
mrmathis View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 May 2007
Location: United States
Status: Offline
Points: 105
Post Options Post Options   Thanks (0) Thanks(0)   Quote mrmathis Quote  Post ReplyReply Direct Link To This Post Posted: 03 March 2010 at 4:28pm
I was looking for a way to cause a pane with focus to collapse, and this fit my bill.  I implemented it by subclassing CXTPDockingPaneAutoHidePanel and catching OnLButtonDown, rather than changing Codejock code.  I'm not wild about either approach, though, since both leave me vulnerable to changes from Codejock.  Since the original posts are old, I'm wondering whether some better way to do this might be available now?
 
 
--Mike
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.