FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Thumbnail of window
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Thumbnail of window
Posted: Thu Apr 07, 2022 07:48 AM

Hi,

There is a list of windows (handles). Is it possible to make thumbnails of these windows ?

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Thumbnail of window
Posted: Thu Apr 07, 2022 11:08 PM

Maybe you should use folders instead.

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Thumbnail of window
Posted: Fri Apr 08, 2022 05: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 (fw): Select all Collapse
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
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Thumbnail of window
Posted: Fri Apr 08, 2022 09: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()

Continue the discussion