LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Getting screen coordinates from Range

Hi,

I'm trying to get the screen location of a Range object. Currently
I'm doing (C++):

CRange range = application.get_ActiveCell();
int rangeLeft = int(range.get_Left().dblVal / 0.75 ) + 25;
int rangeTop = int(range.get_Top().dblVal / 0.75) + 16;
pWnd-ClientToScreen(&ptForBalloon);

But this obviously has some problems (doesn't handle zooming,
multiple panes, etc).

I found some nice code by keepITcool that handles most of this:
http://groups.google.com.au/group/mi...9aac2dde2e778/

But it still doesn't handle Panes.

Anyone know a full solution?

Some other questions:
1) PointsToScreenPixelsX doesn't show up in my VS generated C++
wrappers. Any idea how to deal with this?
2) What I *really* want is to be able to select/get the location of
some text within a cell, not the cell itself. Is this possible?

[The reason I want to do this is to support Excel in my HandyFind
freeware that lets you Find as You Type and displays a balloon to guide
your eye to the found text. I put a preview including Excel support at
http://www.handykeys.com/preview in case you are interested. Any
feedback is much appreciated. Please send it to the email address on
that page.]

Thanks!
-Edwin Evans

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
And once again: X and Y Screen Coordinates of a Range marsou Excel Programming 8 August 23rd 05 11:43 AM
X and Y Screen Coordinates of a Range !!! RAFAAJ2000[_2_] Excel Programming 8 June 22nd 05 12:07 AM
Cell address nearest to screen coordinates Doug Glancy Excel Programming 0 August 25th 04 07:33 PM
determining coordinates for screen placement of user form PatFinegan[_10_] Excel Programming 2 January 31st 04 09:03 PM
Screen Coordinates of a given cell in XL hglamy[_2_] Excel Programming 2 October 15th 03 02:03 PM


All times are GMT +1. The time now is 07:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"