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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

705 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