Solved

Obtain the offset (position) of static control

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Different colored text in ComboBox without Subclassing 8 73
how do i create updater to My Activex application? 3 102
isEverywhere  challenge 19 85
Capture logon name 13 105
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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 …
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.

733 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