Solved

Obtain the offset (position) of static control

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

816 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

11 Experts available now in Live!

Get 1:1 Help Now