﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
1977	_ScreenCapture_CaptureWnd - wrong capture on maximized window	MrCreatoR <mscreator@…>		"Whe we use _ScreenCapture_CaptureWnd on maximized window, there is extra pixels that should not be captured (it's the size of the window borders).

The fix is simple, just calculate the size of the border of specified window in case it's maximized:

{{{
Func _ScreenCapture_CaptureWnd($sFileName, $hWnd, $iLeft = 0, $iTop = 0, $iRight = -1, $iBottom = -1, $fCursor = True)
	Local $tRect = _WinAPI_GetWindowRect($hWnd)
	Local $aWinClientSize, $aWinPos, $iBorder
	
	If BitAND(WinGetState($hWnd), 32) Then ;windows is maximized
		$aWinClientSize = WinGetClientSize($hWnd)
		$aWinPos = WinGetPos($hWnd)
		If Not @error Then $iBorder = ($aWinPos[2] - $aWinClientSize[0]) / 2
	EndIf
	
	$iLeft += DllStructGetData($tRect, ""Left"") + $iBorder
	$iTop += DllStructGetData($tRect, ""Top"") + $iBorder
	If $iRight = -1 Then $iRight = DllStructGetData($tRect, ""Right"") - DllStructGetData($tRect, ""Left"") - $iBorder
	If $iBottom = -1 Then $iBottom = DllStructGetData($tRect, ""Bottom"") - DllStructGetData($tRect, ""Top"") - $iBorder
	....
EndFunc
}}}"	Bug	closed		Standard UDFs	3.3.6.1	None	No Bug		
