Solved

Obtain the offset (position) of static control

Posted on 2000-04-26
2
195 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Separate into files by filename 12 76
Detect CR LF to each line 12 153
wait notify demo infinite loop 3 96
Annoying "thing" blocks my view 4 82
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: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

896 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

13 Experts available now in Live!

Get 1:1 Help Now