;Create GUI Layer
$Back = GUICreate("Back", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TRANSPARENT, $WS_EX_TOPMOST, $WS_EX_TOOLWINDOW))
GUISetBkColor(0x0, $Back)
_WinAPI_SetLayeredWindowAttributes($Back, 0x0);, 255, 0x01
WinSetOnTop($Back, "", 1)
GUISetState(@SW_SHOW, $Back)
$hDC_Back = _WinAPI_GetWindowDC($Back)
//Все действия отрисовки и т.д.
{
_WinAPI_RedrawWindow($hDC, 0, 0, BitOR($RDW_ERASE, $RDW_INVALIDATE))
Func _DrawTextEx($hDC, $Text, $FontSize, $LeftValue, $TopValue, $RightValue, $BottomValue, $Colour)
Local $g_tRECT = DllStructCreate($tagRect)
DllStructSetData($g_tRECT, 1, $RightValue)
DllStructSetData($g_tRECT, 2, $BottomValue)
DllStructSetData($g_tRECT, 3, $LeftValue)
DllStructSetData($g_tRECT, 4, $TopValue)
Local $g_hFont = _WinAPI_CreateFont($FontSize, 0, 0, 0, $FW_Normal, False, False, False, $DEFAULT_CHARSET, _
$OUT_DEFAULT_PRECIS, $CLIP_DEFAULT_PRECIS, 0x05, 0, 'Arial Black')
Local $g_hOldFont = _WinAPI_SelectObject($hDC, $g_hFont)
_WinAPI_SetBkColor($hDC, 0x000000)
_WinAPI_SetTextColor($hDC, $Colour)
_WinAPI_DrawText($hDC, $Text, $g_tRECT, BitOR($DT_CENTER, $DT_VCENTER, $DT_END_ELLIPSIS))
EndFunc ;==>_DrawTextEx
_WinAPI_RedrawWindow($hDC, 0, 0, BitOR($RDW_ERASE, $RDW_INVALIDATE))
}
_WinAPI_ReleaseDC($Back, $hDC_Back)
//Писал пару лет назад на AutoIT код абсолютно рабочий и легко переводится на любой другой язык.