Solved

Question about CSplitterWnd !

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
repeatEnd java challenge 42 85
sumDigits challenge 9 172
method notes when mouse over in eclipse 5 90
JQuery serialize and unserialize 8 185
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 …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

762 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