| View previous topic :: View next topic |
| Author |
Message |
jballi
Joined: 01 Oct 2005 Posts: 747 Location: Texas, USA
|
Posted: Sat Jul 07, 2007 2:12 am Post subject: [Function] PopupXY v0.4 - Calculate X/Y Of Pop-Up Window |
|
|
Introduction
They say that necessity is the mother of invention. I needed a way of calculating the coordinates of a pop-up window so that it would be centered relative to the parent window. I checked the forum and the documentation but couldn't find anything like it so I created a simple function to do it for me.
The Code
Final Thoughts
I named the function PopupXY for lack of better name. If you can think of a better name, let me know.
I hope that someone finds this useful.
---------------------------------------------------------------------------
v0.1
First draft.
v0.2
Updated examples.
v0.3
- p_ParentWinTitle and p_ChildWinTitle parameters renamed to p_Parent and p_Child respectively. These parameters can now contain a GUI window number (1 to 99) as well as a window title, See the documentation for more information.
- Updated examples.
v0.4
- The p_Parent and p_Child parameters can now contain a window handle (hWnd). See the documentation for more information.
- The r_ChildX and r_ChildY parameters are now optional.
- The function now returns the calculated coordinates for the child window. See the documentation for more information.
- Updated examples.
Last edited by jballi on Mon Jul 11, 2011 5:50 am; edited 1 time in total |
|
| Back to top |
|
 |
jballi
Joined: 01 Oct 2005 Posts: 747 Location: Texas, USA
|
Posted: Fri Jul 20, 2007 8:54 pm Post subject: |
|
|
| Minor update. See the bottom of the top post for more information. |
|
| Back to top |
|
 |
jballi
Joined: 01 Oct 2005 Posts: 747 Location: Texas, USA
|
Posted: Mon Jul 11, 2011 5:54 am Post subject: |
|
|
v0.4
Minor changes. See the bottom of the top post for more information. |
|
| Back to top |
|
 |
|