Recent

Author Topic: View Window Messages utility  (Read 568 times)

440bx

  • Hero Member
  • *****
  • Posts: 6029
View Window Messages utility
« on: December 26, 2025, 08:33:48 am »
Hello,

At some point in time I wrote a small utility to show what messages a window got.  This was often useful not only to determine the messages the window got in specific situations but also the sequence in which it got them.

Somehow, I lost that utility.  Since it does come in handy every now and then I figured I'd write it again and, this time, share it.

Attached is the source code which includes a Lazarus project file to get 32 and 64 bit debug and release versions.

Also attached is a screenshot of it running and what it shows. 

There is a one-time setup you might want to do and that is, manually move the console window to be next to the GUI window, set its width to 120 (the output will wrap if the width is insufficient causing it to be hard to read), lastly set the screen buffer size to 9999.  That is normally sufficient to see what messages the window is getting without loss due to scrolling.

It's not the kind of utility you'll need very often but, when you need it, it is very handy.

HTH.


FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

cdbc

  • Hero Member
  • *****
  • Posts: 2575
    • http://www.cdbc.dk
Re: View Window Messages utility
« Reply #1 on: December 26, 2025, 11:05:16 am »
Hi
Well done mate  8) Nifty little tool.
Way back in my Delphi days, a tool like that, saved my bacon once  or twice... :D
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

440bx

  • Hero Member
  • *****
  • Posts: 6029
Re: View Window Messages utility
« Reply #2 on: December 26, 2025, 11:28:26 am »
Thank you.  I'm pleased it may be useful to you.

I rarely need it but, when I need it, I _really_ need it.
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

dseligo

  • Hero Member
  • *****
  • Posts: 1651
Re: View Window Messages utility
« Reply #3 on: December 26, 2025, 11:51:24 am »
Nice, thank you

ALLIGATOR

  • Sr. Member
  • ****
  • Posts: 334
  • I use FPC [main] 💪🐯💪
Re: View Window Messages utility
« Reply #4 on: December 26, 2025, 12:34:32 pm »
Yes, it's a good project. I was planning to write something similar myself, but I didn't really need it that much yet 👍👍👍
I may seem rude - please don't take it personally

440bx

  • Hero Member
  • *****
  • Posts: 6029
Re: View Window Messages utility
« Reply #5 on: December 26, 2025, 06:33:13 pm »
Thank you for the kind words. 
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

 

TinyPortal © 2005-2018