Solved

Question about CSplitterWnd !

Posted on 2001-06-14
4
254 Views
Last Modified: 2013-11-20
Hi,

How can I know the coordinates rectangle of the splitter bar and not the splitter window ?

What I want to do, is to change the cursor if the mouse is over this bar.

When I use mysplit->GetClientRect or mysplit->GetWindowRect, it returns me the coordinates of the splitter window.

Thanks in advance.
0
Comment
Question by:mike_marquet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 12

Accepted Solution

by:
migel earned 25 total points
ID: 6194115
Hi!
derive your own class from CSplitterWnd
and override this method:
virtual void SetSplitCursor(int ht);
where ht is hit test codes:
MS doesn`t publish this in the header (why???) only in sources so here it is:

// HitTest return values (values and spacing between values is important)
enum HitTestValue
{
     noHit                   = 0,
     vSplitterBox            = 1,
     hSplitterBox            = 2,
     bothSplitterBox         = 3,        // just for keyboard
     vSplitterBar1           = 101,
     vSplitterBar15          = 115,
     hSplitterBar1           = 201,
     hSplitterBar15          = 215,
     splitterIntersection1   = 301,
     splitterIntersection225 = 525
};

so catch vSplitterBox and hSplitter box and set cursour you need
0
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 6195275
what you need to do to change the cursor is handle OnSetCursor

see http://www.codetools.com/splitter/usefulsplitter.asp for an example
0
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 6195279
what you need to do to change the cursor is handle OnSetCursor

see http://www.codetools.com/splitter/usefulsplitter.asp for an example
0
 

Author Comment

by:mike_marquet
ID: 6201229
Good undocumented function but when I use lockable splitters, the code is ever 0.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
function returning CString in a regular win32 DLL 8 215
either24  challenge 19 110
modThree challenge 4 155
post4 challenge 28 122
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question