` Events used by MS in the User event range (Carl Barnes) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Windows API: Events used by MS in the User event range
2004-05-26 -- Carl Barnes
 
Newsgroups: sv.clarion.suggestions Apparently WM_User Equate(400h) is considered obsolete by Microsoft as they have used messages above 400h. It is a holdover from the 16-bit days. Equates.CLW should add: EVENT:App EQUATE(8000h) and note that Event:User is deprecated and EVENT:App should be used and EVENT:Last increased to EQUATE (0FFFFH) and the templates should change to use EVENT:App (3 places) Mentioned in the Errata to Petzold's newest edition to Programing Windows http://www.jasondoucette.com/books/pw5/pw5errata.html MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/Windowing/MessagesandMessageQueues/MessagesandMessageQueuesReference/MessagesandMessageQueuesMessages/WM_USER.asp The following are the ranges of message numbers. Range Meaning 0 through WM_USER1 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. Message numbers in the first range (0 through WM_USER1) are defined by the system. Values in this range that are not explicitly defined are reserved for future use by the system. 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. Message numbers in the third range (0x8000 through 0xBFFF) are available for application to use as private messages. Message in this range do not conflict with system messages. Message numbers in the fourth range (0xC000 through 0xFFFF) are defined at run time when an application calls the RegisterWindowMessage function to retrieve a message number for a string. All applications that register the same string can use the associated message number for exchanging messages. The actual message number, however, is not a constant and cannot be assumed to be the same between different sessions. Message numbers in the fifth range (greater than 0xFFFF) are reserved for future use by the system.


Today is November 21, 2024, 3:57 am
This article has been viewed 35205 times.
Google search has resulted in 24 hits on this article since January 25, 2004.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: