Thumbnail of window

Thumbnail of window

Postby Natter » Thu Apr 07, 2022 7:48 am

Hi,

There is a list of windows (handles). Is it possible to make thumbnails of these windows ?
Natter
 
Posts: 1203
Joined: Mon May 14, 2007 9:49 am

Re: Thumbnail of window

Postby James Bott » Thu Apr 07, 2022 11:08 pm

Maybe you should use folders instead.
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Thumbnail of window

Postby Jimmy » Fri Apr 08, 2022 5:33 am

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 view
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
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Thumbnail of window

Postby Natter » Fri Apr 08, 2022 9:03 am

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()
Natter
 
Posts: 1203
Joined: Mon May 14, 2007 9:49 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 48 guests