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
Solved

Question about CSplitterWnd !

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
deburging in oracle form 12 104
Hibernate methods 2 77
EvenOdd challenge 10 124
Bartender label printing - switch on and off graphics 3 54
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used.

790 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