Modify

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 J-Paul Mesnage, 16 years ago

Milestone: 3.3.7.0
Owner: changed from Gary to J-Paul Mesnage
Resolution: Completed
Status: newclosed

Added by revision [5801] in version: 3.3.7.0

Modify Ticket

Action
as closed The owner will remain J-Paul Mesnage.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.