Click here to Skip to main content
6,934,508 members and growing! (14,066 online)
Email Password   helpLost your password?
Languages » C# » General     Intermediate

Windows Message ID constants

By Anthony Baraff

C# enumeration with most standard Windows message ID constants
C#.NET1.0, Win2K, WinXP, Visual-Studio, Dev
Posted:22 Apr 2002
Views:135,976
Bookmarked:48 times
printPrint Friendly   add Share
      Discuss Discuss   Broken Article?Report  
65 votes for this article.
Popularity: 8.68 Rating: 4.79 out of 5
2 votes, 3.5%
1

2

3
6 votes, 10.5%
4
49 votes, 86.0%
5

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


Member

Occupation: Web Developer
Location: United States United States

Other popular C# articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 25 of 27 (Total in Forum: 27) (Refresh)FirstPrevNext
GeneralThanks PinmemberSNathani7:03 13 Nov '09  
GeneralToo good PinmemberXmen W.K.21:57 24 Aug '09  
GeneralThank you! Pinmemberlcalabrese15:01 10 Dec '08  
GeneralGreat Mann..! PinmemberBilal Haider Asi14:06 1 Feb '08  
GeneralVB.NET version Pinmembersyed shujaat hussain20:28 27 Dec '06  
GeneralGreat Thanks!!! Pinmemberwirthmaster6:01 14 Nov '06  
GeneralMissing Message PinmemberDeutsche Dogge11:48 27 Aug '06  
GeneralTHANK YOU!!! PinmemberPolymorpher7:45 1 Jul '06  
Thanks alot man, I can't belive this isnt built in...

Pablo
www.aes4you.com
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  
GeneralRe: lose SC_CLOSE,SC_MOVE,SC_MAXIMIZE,SC_MINIMIZE,SC_SIZE! Pinmembergdbjohnson11:17 26 Nov '04  
GeneralRe: lose SC_CLOSE,SC_MOVE,SC_MAXIMIZE,SC_MINIMIZE,SC_SIZE! PinmemberNasenbaaer7:05 27 Jul '07  
GeneralThank you a lot! PinmemberPhan Nguyen20:20 19 Jun '03  
GeneralExtremely useful for C# coders who don't have VC++ PineditorNishant S16:16 18 Sep '02  
Generalenum declaration PinmemberOlaf Herrmann23:15 23 Apr '02  
GeneralRe: enum declaration PinmemberAnthony Baraff2:47 24 Apr '02  
GeneralRe: enum declaration PinmemberAnonymous9:11 24 Apr '02  
GeneralRe: enum declaration PinmemberAnthony Baraff11:17 24 Apr '02  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

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

PermaLink | Privacy | Terms of Use
Last Updated: 22 Apr 2002
Editor: Nishant Sivakumar
Copyright 2002 by Anthony Baraff
Everything else Copyright © CodeProject, 1999-2010
Web18 | Advertise on the Code Project