Solved

Accessing the message Queue??

Posted on 1998-12-02
7
185 Views
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???
0
Comment
Question by:ross_nolan
  • 4
  • 3
7 Comments
 

Accepted Solution

by:
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
0
 

Author Comment

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

Expert Comment

by:gulliver
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
0
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 

Author Comment

by:ross_nolan
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

cheers
0
 

Expert Comment

by:gulliver
ID: 1325659
OK,

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 ?

0
 

Author Comment

by:ross_nolan
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.
0
 

Author Comment

by:ross_nolan
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
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

770 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