Modify

Opened 14 years ago

Closed 14 years ago

#1478 closed Feature Request (Completed)

Make _ScreenCapture_CaptureWnd convert HWnd

Reported by: NerdFencer Owned by: Jpm
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 Changed 14 years ago by Jpm

  • Milestone set to 3.3.7.0
  • Owner changed from Gary to Jpm
  • Resolution set to Completed
  • Status changed from new to closed

Added by revision [5801] in version: 3.3.7.0

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Jpm.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.