Skip to main content
gamedev.net
🔒 Locked

Dialog Position

Started by Kincaid Nov 1, 2005 at 8:58 AM 2 replies 300+ views
Original Post
Kincaid
Kincaid
How can I obtain the X and Y coordinate of an item (eg. checkbox/textfield) within a dialog screen ???? [Edited by - Kincaid on November 1, 2005 11:35:04 AM]
Skeleton_V@T
Skeleton_V@T
If you know the position of OpenGL's area in your main window then it shouldn't be any problem in transforming main window's cursor position to GL's cursor position:

CursorInGL.X = CursorInMainWindow.X - GL.Left ;
CursorInGL.Y = CursorInMainWindow.Y - GL.Top ;

GL.Left and GL.Top is in main window's coordinates.
V@T
--> The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones <--
Kincaid
Kincaid
the opengl drawing area is exactly what I need. I know what to do when I have that information, I just don't know how to obtain it.
Skeleton_V@T
Skeleton_V@T
Check out this API function:

GetWindowInfo ()

Hth
V@T
--> The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones <--

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.