Thumbnail of window

Post Reply
Natter
Posts: 1244
Joined: Mon May 14, 2007 9:49 am

Thumbnail of window

Post by Natter »

Hi,

There is a list of windows (handles). Is it possible to make thumbnails of these windows ?
User avatar
James Bott
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Thumbnail of window

Post by James Bott »

Maybe you should use folders instead.
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: Thumbnail of window

Post by Jimmy »

hi,

i do not know how to simulate ALT + TAB ... have something to do with GetAltTabInfo

when have TaskList of (visible) Windows Handle you can get Icon from App
! Note : this Xbase++ Code use ANSI ( for Unicode change it to "W" )

Code: Select all | Expand

FUNCTION FindIcon(nHandle)
LOCAL nIcon
LOCAL ICON_SMALL:=0
LOCAL ICON_BIG:=1
LOCAL GCL_HICONSM:=-34
LOCAL GCL_HICON:=-14
LOCAL IDI_WINLOGO:=32517

   nIcon := SendMessageA(nHandle, WM_GETICON, ICON_BIG, 0)
   if nIcon != 0
      RETURN nIcon
   endif

   nIcon := SendMessageA(nHandle, WM_GETICON, ICON_SMALL, 0)
   if nIcon != 0
      RETURN nIcon
   endif

   nIcon := GetClassLongA(nHandle, GCL_HICON)
   if nIcon != 0
      RETURN nIcon
   endif

   nIcon := GetClassLongA(nHandle, GCL_HICONSM)
   if nIcon != 0
      RETURN nIcon
   endif

   nIcon:=LoadIconA( 0, IDI_WINLOGO )
RETURN nIcon


p.s. when nIcon = IDI_WINLOGO -> Service or other Task
greeting,
Jimmy
Natter
Posts: 1244
Joined: Mon May 14, 2007 9:49 am

Re: Thumbnail of window

Post by Natter »

Thank you, Jimmy!
I needed to get thumbnails of visible application windows and browser pages and show them in xBrowse. I solved this problem by saving the windows to a bmp file - SaveWindow(). and then making miniatures of them - FiMakeThumbNail()
Post Reply