Windows Messaging not working

Himo

Regular
Joined
Dec 22, 2004
Messages
61
Location
the Netherlands
I want to work with Windows Message and I began programming, but then at runtime I got the following error:

"Message Queuing has not been installed on this computer"

What should I do about this? I've got VS 2003 Academic(Professional in some ways) edition

Or is this not the way to intercept WM messages?
 
Last edited:
is your Messenger Service running?
Control Panel --> Administrative Tools --> Services --> Messenger --> Enable or Disable
 
Think there might be a bit of confusion here, are you refering to the Windows Messenger service, MSN Messenger, trying to intercept the WM_ messages windows sends to your application or are you in fact refering to Message Queuing?
 
I'm trying to intercept the WM messages that windows sends to my application. I thought the Messaging Queue was a good lead to begin, but it's not installed/working.

BTW: Messaging service is running
 
In that case you can ignore System.Messaging.Dll as that is entirely to do with message queuing and not related to to windows messages; also the messaging service is not required either.
From a windows form you can override the form's WndProc method

Visual Basic:
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
    'typically something like
    Select Case m.Msg  'WM_ message
    End Select
End Sub
 
I got this to work, but now I'm wondering. In C++ you could just include windows.h to have all the WM message constants at hand. But how is this done in C# or VB for that matter? When opening windows.h I saw nothing more than a bunch of more includes, so I kinda stopped looking after searching for WinMessages and WM.
 
You would have to define the constants for the relevant WM_* messages yourself. Clicky has a useful list to be getting on with.
Also it might be worth seeing if the functionality you are trying to achieve is already part of the .Net framework to begin with - could save you a lot of time and trouble.
 
It's just for learning, so it may be a bit working around. Thanks again :)
I was just looking for that. I put all the constants in a public class, so I can easily access them.
 
Back
Top