Opened 16 years ago
Closed 16 years ago
#1478 closed Feature Request (Completed)
Make _ScreenCapture_CaptureWnd convert HWnd
| Reported by: | NerdFencer | Owned by: | J-Paul Mesnage |
|---|---|---|---|
| Milestone: | 3.3.7.0 | Component: | Standard UDFs |
| Version: | Severity: | None | |
| Keywords: | Cc: |
Description
The code in _ScreenCapture_CaptureWnd (from ScreenCapture.au3) can capture window controls as well as windows, but this is not apparent because it is not mentioned and fails if passed the raw handle returned by a GUICtrlCrate function.
This can easily be fixed by modifying one line of the header, and adding another to the function.
line 100:
; Description ...: Captures a screen shot of a specified window
Change to:
; Description ...: Captures a screen shot of a specified window or control
Insert before line 125:
If Not(IsHWnd($hWnd)) Then $hWnd=GUICtrlGetHandle($hWnd)
Before:
Local $tRect = _WinAPI_GetWindowRect($hWnd)
After:
If Not(IsHWnd($hWnd)) Then $hWnd=GUICtrlGetHandle($hWnd)
Local $tRect = _WinAPI_GetWindowRect($hWnd)
This simple change makes the function fail less easily, and makes its full ability more apparent.
Attachments (0)
Change History (1)
comment:1 by , 16 years ago
| Milestone: | → 3.3.7.0 |
|---|---|
| Owner: | changed from to |
| Resolution: | → Completed |
| Status: | new → closed |

Added by revision [5801] in version: 3.3.7.0