IonicWind Software

Aurora Compiler => General Discussion => Topic started by: John Syl. on April 12, 2008, 03:22:13 AM

Title: Windows Messages
Post by: John Syl. on April 12, 2008, 03:22:13 AM
I think this may be a Paul question.

I am experimenting with  messages both threads and windows, with some success.
However, heres the question.  In the MSDN overview of messages and queues http://msdn2.microsoft.com/en-us/library/ms644927(VS.85).aspx#app_defined (http://msdn2.microsoft.com/en-us/library/ms644927(VS.85).aspx#app_defined)
it quotes:
Quote# The system reserves message-identifier values in the range 0x0000 through 0x03FF (the value of WM_USER â€ââ,¬Å" 1) for system-defined messages. Applications cannot use these values for private messages.
# Values in the range 0x0400 (the value of WM_USER) through 0x7FFF are available for message identifiers for private window classes.

While working with these messages I've noticed messages in the region of 0x0400 appearing.  As they are in the user message area, I assume that they are being used as part of the Aurora operation.  Assuming this is correct, what ranges of values of messages are safe to use in the Aurora environment?

many thanks
John
Title: Re: Windows Messages
Post by: Ionic Wind Support Team on April 12, 2008, 09:39:46 AM
Microsoft is confusing aren't they ;)

In reality most of the common controls use message values in the WM_USER range, not by me of course, but by Microsoft themselves.  Because later on in the development of Windows they came up with a new rule.   WM_APP (0x8000) is the beginning of application defined messages.

You can use the WM_USER range as long as the messages are only sent to your windows private message handler, such as a custom control

In any event the message ranges are:

System messages: 0 to 0x3FF
WM_USER 0x400 to 0x7FFF
WM_APP 0x8000 to 0xBFFF
Registered messages 0xC000 to 0xFFFF

Paul.

Title: Re: Windows Messages
Post by: John Syl. on April 13, 2008, 01:17:39 PM
Thanks Paul.

Shows how naive I am, believing what Microsoft say ::)

As it happened it was not a big problem, but could have given me a headache, now I know I can avoid any problems...I hope.

Many thanks

John