Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

refresh windows task bar

$
0
0

Hi,

 

I am drawing on the windows task bar with GDI. The Problem: I cant remove what I have drawn, because I cant get the taskbar to refresh.

Every other window can receive a WM_Paint Message. Not so the task bar (and the desktop btw)

 

What to do here?

AutoIt         
#include <WinAPI.au3> #include <SendMessage.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <GDIPlus.au3> _GDIPlus_Startup() Sleep(150) $hDC      = _WinAPI_GetWindowDC(  0 ) ; DC of entire screen (desktop) $hGraphic = _GDIPlus_GraphicsCreateFromHDC( $hDC ) _GDIPlus_GraphicsDrawString( $hGraphic, "deleting...", @DesktopWidth - 400 , @DesktopHeight - 18 ) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_Shutdown() ; Remove STRING ???????? Opt('WINTITLEMATCHMODE', 4) $hWnd = WinGetHandle( "classname=Shell_TrayWnd"  ) ; 1 Nope... _SendMessage(  $hWnd , $WM_PAINT , 0 , 0  ) ; 2 Nope... _SendMessage(  $hWnd , $WM_ERASEBKGND , 0 , 0  ) ; 3 Nope... _WinAPI_RedrawWindow( $hWnd ) ; 4 Nope... $paint = DllStructCreate("int;int;long;long;long;long;int;int;byte[32]") DllCall("user32.dll", "int", "EndPaint", "hwnd", $hWnd  , "ptr", DllStructGetPtr($paint)) ; 5 Nope... WinSetState( $hWnd, '' , @SW_RESTORE) ; 6 Nope... WinSetState( $hWnd , '' , @SW_SHOW )

Thank you very much

 

regards

 

Bluesmaster


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>