Solved

Question about CSplitterWnd !

Posted on 2001-06-14
4
261 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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

623 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