Retrive Win messages whitout focus in Borland Builder
Posted on 1998-11-02
I'm using Borland C++ Builder and I want to to be able to
read a lot of messages from Windows (like WM_KEYDOWN,WM_KEYUP,
WM_ENDSESSION ,WM_QUERYENDSESSION) in a program, whitout Windows having focus on that window.
I have seen a small program example that make their own windows from Win API calls, that handle WM_ENDSESSION, but I can't modify it to Borland way.
I want an simple example in how to "hook" this messages in Borland C++ Builder and to handle them in a procedure of my own (in my program, not in a DLL).
Do I need to use API SetWindowsHook, or can I do it without it?
The reason I want this is that I want a program
that listen to all keybord input.