Click here to Skip to main content
Licence 
First Posted 22 Apr 2002
Views 163,969
Downloads 1,859
Bookmarked 56 times

Windows Message ID constants

By Anthony Baraff | 22 Apr 2002
C# enumeration with most standard Windows message ID constants
2 votes, 2.9%
1

2

3
7 votes, 10.1%
4
60 votes, 87.0%
5
4.92/5 - 77 votes
2 removed
μ 4.81, σa 1.28 [?]

Introduction

The .NET base classes manage to insulate the programmer from many of the details of how applications interact with the underlying operating system, but in order to implement advanced UI functionality Microsoft leaves you no option but to interoperate with windows plumbing. The IMessageFilter interface requires you to use the System.Windows.Forms.Message struct which wraps a windows message. The Msg property corresponds to an int value that stores a constant indicating the type of message, Windows is sending your application. To my knowledge, Microsoft has not incorporated an enumeration with the commonly used constants. So, I stripped all of the messages I could find in the CommCtrl.h and WinUser.h header files and created an enum. I hope that you find it useful.

namespace WindowsUtilities
{
    public enum WindowsMessages: int
    {
        WM_NULL = 0x0000,
        WM_CREATE = 0x0001,

        //Refer the WindowMessages.cs file
        //for complete source listing

        LM_SETITEM = (WM_USER + 0x302), 
        LM_GETITEM = (WM_USER + 0x303)
    }
}

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Anthony Baraff

Web Developer

United States United States

Member


Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionThank you!! Very Useful!! Pinmembergallicox0:47 17 Oct '11  
GeneralMy vote of 5 PinmemberPaul Miranda7:14 30 Aug '11  
GeneralMy vote of 5 Pinmemberrahul_raut0:54 9 May '11  
GeneralTHANKS a LOT! Pinmemberrahul_raut0:53 9 May '11  
GeneralMy vote of 5 PinmembergisKing16:32 18 Apr '11  
GeneralMy vote of 5 PinmemberDiwakar Gupta20:54 19 Jul '10  
GeneralThanks PinmemberSNathani7:03 13 Nov '09  
GeneralToo good PinmemberXmen W.K.21:57 24 Aug '09  
GeneralThank you! Pinmemberlcalabrese15:01 10 Dec '08  
GeneralRe: Thank you! Pinmemberthanhhong8x7:04 6 Jan '11  
GeneralGreat Mann..! PinmemberBilal Haider Asi14:06 1 Feb '08  
GeneralVB.NET version Pinmembersyed shujaat hussain20:28 27 Dec '06  
GeneralRe: VB.NET version PinmemberIsrael Thomas7:10 30 Sep '11  
GeneralGreat Thanks!!! Pinmemberwirthmaster6:01 14 Nov '06  
GeneralMissing Message PinmemberDeutsche Dogge11:48 27 Aug '06  
GeneralTHANK YOU!!! PinmemberPolymorpher7:45 1 Jul '06  
GeneralThanks a million PinmemberSalim Ansari6:52 3 Mar '06  
GeneralThx PinmemberWiebe Tijsma5:23 2 Aug '05  
GeneralNice! PinmemberYakumo Fujii20:25 3 Jul '05  
GeneralThank You PinmemberRana Ian20:03 6 Apr '05  
GeneralThanks Pinmemberbkalicharan15:08 18 Sep '04  
GeneralThank's Pinmembergomess8:26 4 Apr '04  
GeneralJust what I needed, thanks! PinmemberDonDavis10:44 15 Jan '04  
Generallose SC_CLOSE,SC_MOVE,SC_MAXIMIZE,SC_MINIMIZE,SC_SIZE! Pinmemberlangmu liu17:33 10 Sep '03  
GeneralRe: lose SC_CLOSE,SC_MOVE,SC_MAXIMIZE,SC_MINIMIZE,SC_SIZE! PinsussAnonymous2:01 7 Sep '04  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web02 | 2.5.120210.1 | Last Updated 23 Apr 2002
Article Copyright 2002 by Anthony Baraff
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid