Click here to Skip to main content
6,293,171 members and growing! (11,628 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#.NET 1.0, Win2K, WinXP, Visual Studio, Dev
Posted:22 Apr 2002
Views:125,903
Bookmarked:42 times
Announcements
Loading...
 
Search    
Advanced Search
printPrint   Broken Article?Report       add Share
  Discuss Discuss   Recommend Article Email
60 votes for this article.
Popularity: 8.50 Rating: 4.78 out of 5
2 votes, 3.8%
1

2

3
5 votes, 9.6%
4
45 votes, 86.5%
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 25 (Total in Forum: 25) (Refresh)FirstPrevNext
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  
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  
GeneralRe: enum declaration PinmemberArmen Hakobyan2:20 27 May '02  
Generalthanks mate PinmemberJeremy Pullicino9:27 23 Apr '02  

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

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