#include <WinAPISysWin.au3>
#include <WinAPIGdiDC.au3>
#include <WinAPIGdi.au3>
#include <ScreenCapture.au3>
#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$zzz = WinGetHandle("Windows Media Player")
GrayCapture($zzz)
Func GrayCapture($HWnd)
if Not WinExists($HWnd) Then Return 0
_GDIPlus_Startup()
Local $w = _WinAPI_GetWindowWidth($HWnd)