mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 12:31:25 +00:00
; * src/w32image.c (w32_gdip_export_frame): Add error checking.
This commit is contained in:
parent
b3c0aee42b
commit
f46eaf609e
1 changed files with 5 additions and 1 deletions
|
|
@ -580,9 +580,13 @@ w32_gdip_export_frame (HWND hwnd, Lisp_Object file, CLSID *clsid)
|
|||
made visible, in which case users might want them in the image.
|
||||
The downside is that the image has some of the desktop around the
|
||||
frame included in it. So what? */
|
||||
GetWindowRect (hwnd, &frame_rect);
|
||||
if (!GetWindowRect (hwnd, &frame_rect))
|
||||
return -1;
|
||||
frame_width = frame_rect.right - frame_rect.left;
|
||||
frame_height = frame_rect.bottom - frame_rect.top;
|
||||
if (!(frame_width > 0 && frame_height > 0))
|
||||
return -1;
|
||||
|
||||
hdc = GetWindowDC (hwnd);
|
||||
bits_per_pixel = GetDeviceCaps (hdc, BITSPIXEL);
|
||||
capture_hdc = CreateCompatibleDC (hdc);
|
||||
|
|
|
|||
Loading…
Reference in a new issue