Solved

Obtain the offset (position) of static control

Posted on 2000-04-26
2
193 Views
Last Modified: 2013-11-20

Hello.

To obtain the offset of static control I use GetClientRect function.
But This returns only height and weidth of the target conrol.

I heard GetWindowRect function returns the position of static control, but It returns window refernced position, how can I get position of
static control refernced client window?
0
Comment
Question by:worker018
  • 2
2 Comments
 
LVL 10

Accepted Solution

by:
RONSLOW earned 50 total points
ID: 2754974
Get the window rect of the control and the parent.  Then get the difference.
0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 2754979
Alternatively, get teh window (screen) coords of the control and convert to client coord of the parent.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
paragon account problem 9 96
Strange date stored 22 100
FizzBuzz challenge 9 73
unix example issues 18 49
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

746 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now