Local $hWnd, $hDDC, $HDDC1, $hCDC1, $hBMP1, $iW, $iH
$iW = 300
$iH = 300
$hWnd = _WinAPI_GetDesktopWindow()
$hDDC = _WinAPI_GetDC($hWnd)
$GUIHandle = GUICreate("Stitched", $iW, $iH * 2, 300, 300)
GUISetState()
$hDDC1 = _WinAPI_GetDC($GUIHandle)
$hCDC1 = _WinAPI_CreateCompatibleDC($hDDC1)
$hBMP1 = _WinAPI_CreateCompatibleBitmap($hDDC1, $iW, $iH * 2)
_WinAPI_SelectObject($hCDC1, $hBMP1)
_WinAPI_BitBlt($hDDC1, 0, 0, $iW, $iH, $hDDC, 0, 0, $SRCCOPY)
_WinAPI_BitBlt($hDDC1, 0, $iH, $iW, $iH, $hDDC, 0, 0, $SRCCOPY)
_WinAPI_BitBlt($hCDC1, 0, 0, $iW, $iH, $hDDC, 0, 0, $SRCCOPY)
_WinAPI_BitBlt($hCDC1, 0, $iH, $iW, $iH, $hDDC, 0, 0, $SRCCOPY)
_WinAPI_ReleaseDC($hWnd, $hDDC)
_WinAPI_ReleaseDC($GUIHandle, $hCDC1)
_WinAPI_DeleteDC($hCDC1)
_ScreenCapture_SaveImage("F:\abc.png", $hBMP1)
_WinAPI_DeleteObject($hBMP1)