Accessing the message Queue??

Posted on 1998-12-02
Last Modified: 2013-11-20
I want to access the message queue in windows95 so that I can see when:
1) the screen image has been updated
2) a mouse action has been performed
3) a keyboard action has been performed

and perform specific actions depending on the item in the message queue

Any ideas???
Question by:ross_nolan
  • 4
  • 3

Accepted Solution

gulliver earned 60 total points
ID: 1325655
Very simple, if you use Visual C++ you have a very usefull tool which is called "Spy++" and you can see all the messages of Windows95 on any window.

After you can trap all this messages with the "PretransalteMessage" of your app.

Good luck

Author Comment

ID: 1325656
How can I trap the messages in Spy++ in VC??

Expert Comment

ID: 1325657
Very simple,In the menu Spy, you have the option MessagesIn the dialog window take the circle with your mouse and put it on the window you want to trap Messages.After you can filter the messages you show
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.


Author Comment

ID: 1325658
while you are going in the right direction I am not sure you understand what exactly I am looking to do.

What I am proposing to do is to Capture certain messages in the queue in an MFC application and perform actions based on these messages.

Any further help would be appriciated


Expert Comment

ID: 1325659

In your class Wizzard select the Class and Add the PreTranslateMessage Function
After you can test every message like this,
if (pMsg->Message==WM_KEYDOWN)

Is it OK ?


Author Comment

ID: 1325660
My problem is "how do I make pMsg point to all the messages generated by the computer", so that I can see when the screen has been changed or the mouse used, by an MFC application running in the background.

Author Comment

ID: 1325661
I will give you the points because the first answer you gave me pointed me in the right direction for what I wanted to do.
Which is by the way:

create a Hook DLL that will watch all the system messages and any that I wish to process will be sent to appropriate in my program.

all the best

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Login Script to Copy Folders 12 42
wordcount challenge 11 132
Problem to event 3 102
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In an interesting question ( here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question