tool displaying win ids on mouseover
tool displaying win ids on mouseover
this could be of interest for any windows progammer. just found it in another forum:
"WinID allows to get the most important information about Windows control classes, styles, and window titles. All you need is to point mouse cursor to a window, or any of system or custom-created control."
http://dennisbabkin.com/php/download.php?what=WinID
"WinID allows to get the most important information about Windows control classes, styles, and window titles. All you need is to point mouse cursor to a window, or any of system or custom-created control."
http://dennisbabkin.com/php/download.php?what=WinID
-- spot | www.nothing.ch
-
- Enthusiast
- Posts: 613
- Joined: Tue May 06, 2003 2:50 pm
- Location: Germany
- Contact:
or try this
http://www.greatis.com/windowse.htm
http://www.greatis.com/windowse.htm
-
- Enthusiast
- Posts: 202
- Joined: Sun Apr 27, 2003 4:44 am
- Location: Michigan, USA
- Contact:
Re: tool displaying win ids on mouseover
I personally like "ShoWin" because it shows details for ANY window, even
ones that "WinID" doesn't, and also "invisible" windows that are not seen:
http://www.foundstone.com/resources/proddesc/showin.htm
I'll have to check out the other suggestions to see how they fare.
ones that "WinID" doesn't, and also "invisible" windows that are not seen:
http://www.foundstone.com/resources/proddesc/showin.htm
I'll have to check out the other suggestions to see how they fare.

Weirdly enough, I wrote one of these in PB last night! Should be very easy to add more information to (and display the information in a better way than I'm doing here)...
Code: Select all
OpenWindow (0, 200, 200, 500, 200, #PB_Window_SystemMenu, "WindowInfo")
SetTimer_ (WindowID (), 0, 100, 0)
Repeat
Select WaitWindowEvent ()
Case #WM_TIMER
GetCursorPos_ (@p.POINT)
source = WindowFromPoint_ (p\x, p\y)
If source <> WindowID ()
GetWindowText_ (source, ReAllocateMemory (0, 255), 255)
title$ = PeekS (MemoryID ())
GetClassName_ (source, ReAllocateMemory (0, 255), 255)
class$ = PeekS (MemoryID ())
SetWindowText_ (WindowID (), title$ + " [Class: " + class$ + "]")
Else
SetWindowText_ (WindowID (), "WindowInfo's own window")
EndIf
Case #PB_Event_CloseWindow
End
EndSelect
ForEver
> I wrote one of these in PB last night
Hi-Toro, your example doesn't get the details of all windows, whereas the
app I mentioned ("ShoWin") does. For example: (In Win 98 SE), open the
"Taskbar & Start Menu" item, select "Start Menu Programs", and try to get
the info of the buttons etc inside the FrameGadgets. Only ShoWin seems
to be able to get such info. I've been trying to also do this for ages, and I
was hoping your example could do it, but no.
Anyone know how?
Hi-Toro, your example doesn't get the details of all windows, whereas the
app I mentioned ("ShoWin") does. For example: (In Win 98 SE), open the
"Taskbar & Start Menu" item, select "Start Menu Programs", and try to get
the info of the buttons etc inside the FrameGadgets. Only ShoWin seems
to be able to get such info. I've been trying to also do this for ages, and I
was hoping your example could do it, but no.

Well, you can get all windows like this:
Code: Select all
Procedure ListWindows (window, parameter)
GetClassName_ (window, ReAllocateMemory (0, 255), 255)
class$ = PeekS (MemoryID ())
GetWindowText_ (window, ReAllocateMemory (0, 255), 255)
title$ = PeekS (MemoryID ())
FreeMemory (0)
Debug Chr (34) + title$ + Chr (34) + " / Class: " + class$
ProcedureReturn #TRUE
EndProcedure
EnumWindows_ (@ListWindows (), 0)
This code lists all open windows, including hidden ones and sub-windows. Turn Debug on! Note that ListChildWindows is called recursively on each child-window, using the 'parameter' variable to track 'depth'...
General non-GUI code here...
GUI code with tiny fix (a bit hard-coded to this tree gadget, I'm afraid)...
General non-GUI code here...
Code: Select all
; List top-level windows' children (called by ListWindows)...
Procedure ListChildWindows (window, parameter)
GetClassName_ (window, ReAllocateMemory (0, 255), 255)
class$ = PeekS (MemoryID ())
GetWindowText_ (window, ReAllocateMemory (0, 255), 255)
title$ = PeekS (MemoryID ())
FreeMemory (0)
For a = 1 To parameter
sub$ = sub$ + "--------"
Next
Debug sub$ + ">" + Chr (34) + title$ + Chr (34) + " / Class: " + class$
EnumChildWindows_ (window, @ListChildWindows (), parameter + 1)
ProcedureReturn #TRUE
EndProcedure
; List top-level windows...
Procedure ListWindows (window, parameter)
GetClassName_ (window, ReAllocateMemory (0, 255), 255)
class$ = PeekS (MemoryID ())
GetWindowText_ (window, ReAllocateMemory (0, 255), 255)
title$ = PeekS (MemoryID ())
FreeMemory (0)
Debug ""
Debug "------------------------------------------------------------------------"
Debug Chr (34) + title$ + Chr (34) + " / Class: " + class$
Debug "------------------------------------------------------------------------"
EnumChildWindows_ (window, @ListChildWindows (), 1)
ProcedureReturn #TRUE
EndProcedure
EnumWindows_ (@ListWindows (), 0)
Code: Select all
#TREEGADGET = 0
Procedure ListChildWindows (window, parameter)
GetClassName_ (window, ReAllocateMemory (0, 255), 255)
class$ = PeekS (MemoryID ())
GetWindowText_ (window, ReAllocateMemory (0, 255), 255)
title$ = PeekS (MemoryID ())
If title$ = ""
title$ = "[Unnamed]"
EndIf
FreeMemory (0)
OpenTreeGadgetNode (#TREEGADGET)
AddGadgetItem (#TREEGADGET, -1, title$ + " [" + class$ + "]")
EnumChildWindows_ (window, @ListChildWindows (), 0)
CloseTreeGadgetNode (#TREEGADGET)
ProcedureReturn #TRUE
EndProcedure
Procedure ListWindows (window, parameter)
GetClassName_ (window, ReAllocateMemory (0, 255), 255)
class$ = PeekS (MemoryID ())
GetWindowText_ (window, ReAllocateMemory (0, 255), 255)
title$ = PeekS (MemoryID ())
If title$ = ""
title$ = "[Unnamed]"
EndIf
FreeMemory (0)
OpenTreeGadgetNode (#TREEGADGET)
AddGadgetItem (#TREEGADGET, -1, title$ + " [" + class$ + "]")
EnumChildWindows_ (window, @ListChildWindows (), 1)
CloseTreeGadgetNode (#TREEGADGET)
ProcedureReturn #TRUE
EndProcedure
Procedure WinHook (WindowID, Message, wParam, lParam)
If Message = #WM_SIZE
ResizeGadget (#TREEGADGET, 0, 0, WindowWidth (), WindowHeight () - 25)
RedrawWindow_ (GadgetID (#TREEGADGET), #NULL, #NULL, #RDW_INVALIDATE)
ResizeGadget (1, 0, WindowHeight () - 25, WindowWidth (), 25)
EndIf
ProcedureReturn #PB_ProcessPureBasicEvents
EndProcedure
Procedure GetWindowTree ()
ClearGadgetItemList (#TREEGADGET)
OpenTreeGadgetNode (#TREEGADGET)
AddGadgetItem (#TREEGADGET, -1, "All windows...")
EnumWindows_ (@ListWindows (), 0)
CloseTreeGadgetNode (#TREEGADGET)
EndProcedure
OpenWindow (0, 0, 0, 400, 300, #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget, "All windows...")
CreateGadgetList (WindowID ())
TreeGadget (#TREEGADGET, 0, 0, WindowWidth (), WindowHeight () - 25)
GetWindowTree ()
SetGadgetItemState (0, 0, #PB_Tree_Expanded)
ButtonGadget (1, 0, WindowHeight () - 25, WindowWidth (), 25, "Update list...")
SetWindowCallback (@WinHook ())
Repeat
Select WaitWindowEvent ()
Case #PB_Event_CloseWindow
End
Case #PB_Event_Gadget
If EventGadgetID () = 1
GetWindowTree ()
SetGadgetItemState (0, 0, #PB_Tree_Expanded)
EndIf
EndSelect
ForEver
Last edited by Hi-Toro on Tue Dec 02, 2003 8:58 am, edited 2 times in total.
Hey guys, did someone check this software http://dennisbabkin.com/php/download.php?what=WinID -- they seem to have a cool version now?
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Sysinternal's Process Explorer does it too. And much more. And it's free.
http://www.sysinternals.com/Utilities/P ... lorer.html
http://www.sysinternals.com/Utilities/P ... lorer.html
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).