|
-
Jan 5th, 2001, 06:52 PM
#1
Thread Starter
Frenzied Member
Hi,
I'm implementing a function that requires me to specify a int value for a message to be received after the asynchronous function completes..
My question is, what range of values should a user defined message be in? Obviously, I don't want to specify a value that is already used by a Win32 windows message.
Any help would be appreciated..
Dan
-
Jan 6th, 2001, 05:07 AM
#2
Monday Morning Lunatic
For user messages, they must have values between 0x8000 and 0xBFFF to guarantee that they do not conflict with any system messages.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Jan 6th, 2001, 06:07 AM
#3
Frenzied Member
You can specify a user message like this:
Code:
#define MY_MESSAGE WM_USER + 1
#define MY_MESSAGE_2 WM_USER + 2
-
Jan 6th, 2001, 07:04 AM
#4
Monday Morning Lunatic
WM_USER is also used by the other classes - only the range I gave is actually unused. MS says:
Code:
0 through WM_USER – 1 Messages reserved for use by the system.
WM_USER through 0x7FFF Integer messages for use by private window classes.
WM_APP through 0xBFFF Messages available for use by applications.
0xC000 through 0xFFFF String messages for use by applications.
Greater than 0xFFFF Reserved by the system for future use.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|