|
-
October 24th, 2003, 12:35 AM
#1
user defined messages
hw to declare and use user defined messages and to send them to a another wnd
?
-
October 24th, 2003, 12:44 AM
#2
For defining messages:
#define WM_SOME_MESSAGE WM_USER+1
etc.
For sending messages, use PostMessage() or
SendMessage()
-
October 24th, 2003, 03:56 AM
#3
It is better to use WM_APP.
Message numbers in the second range (WM_USER through 0x7FFF) can be defined and used by an application to send messages within a private window class. These values cannot be used to define messages that are meaningful throughout an application, because some predefined window classes already define values in this range. For example, predefined control classes such as BUTTON, EDIT, LISTBOX, and COMBOBOX may use these values. Messages in this range should not be sent to other applications unless the applications have been designed to exchange messages and to attach the same meaning to the message numbers.
Wakeup in the morning and kick the day in the teeth!! Or something like that.
"i don't want to write leak free code or most efficient code, like others traditional (so called expert) coders do."
-
October 24th, 2003, 05:04 AM
#4
You could use RegisterWindowMessage("AUniqueStringForYourApp") as well.
-
October 24th, 2003, 05:32 AM
#5
Although it deals with accessing control (CWnd's) out of a thread, the following FAQ will show how to send a user-defined message...
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
|