###User Defined Function###
_GUICtrlMenu_CalculatePopupWindowPosition

###Description###
Calculates an appropriate pop-up window position.

###Syntax###
#include <GuiMenu.au3>
_GUICtrlMenu_CalculatePopupWindowPosition ( $iX, $iY, $iWidth, $iHeight [, $iFlags = 0 [, $tExclude = 0]] )


###Parameters###
@@ParamTable@@
$iX
	The x-coordinate, in logical units, of the specified anchor point.
$iY
	The y-coordinate, in logical units, of the specified anchor point.
$iWidth
	The width, in logical units, of the specified window.
$iHeight
	The height, in logical units, of the specified window.
$iFlags
	[optional] The flags that specify how the function positions the pop-up window horizontally and vertically.
		$TPM_CENTERALIGN
		$TPM_LEFTALIGN (Default)
		$TPM_RIGHTALIGN

		$TPM_BOTTOMALIGN
		$TPM_TOPALIGN (Default)
		$TPM_VCENTERALIGN

		$TPM_HORIZONTAL (Default)
		$TPM_VERTICAL

		$TPM_WORKAREA
$tExclude
	[optional] $tagRECT structure that specifies the exclude rectangle.
@@End@@

###ReturnValue###
@@ReturnTable@@
Success 	a $tagRECT structure that contains the pop-up window position.
Failure 	sets the @error flag to non-zero, call <a href="_WinAPI_GetLastError.htm">_WinAPI_GetLastError()</a> to get extended error information.
@@End@@


###Remarks###
This function requires Windows 7 or later.


###Related###


###See Also###
@@MsdnLink@@ CalculatePopupWindowPosition


###Example###
@@IncludeExample@@
