Retrieves the display rectangle of the client area
#include <GuiTab.au3>
_GUICtrlTab_GetDisplayRectEx ( $hWnd )
$hWnd | Handle to the control |
Use this function to obtain the coordinates, in pixels, of the portion of the tab control that represents the contents of the tab pages.
The appearance of this portion of the tab control does not change when different tabs are selected.
$tagRECT, _GUICtrlTab_GetDisplayRect
#include "Extras\HelpFileInternals.au3"
#include <GUIConstantsEx.au3>
#include <GuiTab.au3>
#include <MsgBoxConstants.au3>
Example()
Func Example()
; Create GUI
Local $hGUI = GUICreate("Tab Control Get Display RectEx (v" & @AutoItVersion & ")", 450, 300, 100, 100)
Local $idTab = GUICtrlCreateTab(2, 2, 446, 266)
_MemoMsgBoxStatus() ; Status creation
GUISetState(@SW_SHOW)
; Add tabs
_GUICtrlTab_InsertItem($idTab, 0, "Tab 0")
_GUICtrlTab_InsertItem($idTab, 1, "Tab 1")
_GUICtrlTab_InsertItem($idTab, 2, "Tab 2")
; Get display rectangle
Local $tRECT = _GUICtrlTab_GetDisplayRectEx(GUICtrlGetHandle($idTab))
Local $sRect = StringFormat("[%d, %d, %d, %d]", DllStructGetData($tRECT, "Left"), _
DllStructGetData($tRECT, "Top"), _
DllStructGetData($tRECT, "Right"), _
DllStructGetData($tRECT, "Bottom"))
_MemoMsgBox($MB_SYSTEMMODAL, "Information", "Display rectangle: " & $sRect)
_MemoMsgBoxStatus("", -1, $hGUI) ; no more action, wait GUI for closing
EndFunc ;==>Example
#include "Extras\HelpFileInternals.au3" #include <GuiTab.au3> #include <MsgBoxConstants.au3> Example() Func Example() Local $sFromTo Local $hWin = _MemoRunAU3OutProcess($sFromTo, True) ; OK also if running in different mode Local $hTabCtrl = _MemoCreateOutProcess($hWin, "SysTabControl32", 1, $sFromTo) Local $tRECT = _GUICtrlTab_GetDisplayRectEx($hTabCtrl) Local $sRect = StringFormat("[%d, %d, %d, %d]", DllStructGetData($tRECT, "Left"), _ DllStructGetData($tRECT, "Top"), _ DllStructGetData($tRECT, "Right"), _ DllStructGetData($tRECT, "Bottom")) _MemoMsgBox($MB_SYSTEMMODAL, "Info" & $sFromTo, "Display rectangle: " & $sRect) _MemoMsgBoxStatus("", -1, $hWin) ; no more action, wait GUI for closing, close also OutProcess GUI EndFunc ;==>Example