CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11

Threaded View

  1. #7
    Join Date
    Aug 2006
    Posts
    231

    Re: CDockablePane questions

    OK, I see how it's supposed to work. I also read here: http://msdn.microsoft.com/en-us/magazine/cc301402.aspx, where it says "If the mouse is in the left or right border, the default proc returns HTLEFT or HTRIGHT, respectively. These codes tell Windows to begin its moving or sizing chores. You can prevent moving and sizing by overriding ON_NCHITTEST."

    However, it doesn't work as expected with CDockablePane. My code:

    Code:
    LRESULT CDialogBarEx::OnNcHitTest(CPoint point)
    {	
              LRESULT res = CDockablePane::OnNcHitTest(point);
              if( res == HTLEFT || res == HTRIGHT )
                   res = HTBORDER;
              return res;
    }
    If I set a breakpoint inside this method, it doesn't hit until the cursor is inside the pane borders, and the only result ever returned is HTCLIENT. So, when hovering over the border where the resize cursor appears, the NCHITTEST message is handled somewhere else?
    Last edited by TubularX; August 10th, 2011 at 04:24 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured