Quantcast
Channel: Planet Object Pascal
Viewing all articles
Browse latest Browse all 1725

twm’s blog: Translating Windows messages to strings

$
0
0

I could not find anything like this so I wrote it myself:

This class translates most Windows message ids into their symbolic name.

type
  TWmMessageToString = class
    function MsgToString(const _WmMsg: Cardinal): string; overload;
    function MsgToString(const _Msg: TMessage): string; overload;
  end;

The names are taken from

  • Delphi 2010′s messages.pas
  • Delphi 2010′s controls.pas
  • Wine

It seems pretty complete, but if a message cannot be found, the MsgToString methods return its hexadecimal and decimal representation.

The code is part of my dzlib its the u_dzWmMessageToString unit.


Viewing all articles
Browse latest Browse all 1725

Trending Articles