Results 1 to 6 of 6

Thread: 2 Sweet Enums for System messages and window flags

  1. #1

    Thread Starter
    Addicted Member spyk3's Avatar
    Join Date
    Apr 2009
    Location
    Dothan, AL
    Posts
    218

    2 Sweet Enums for System messages and window flags

    Just some nice enums i came across that could help ALOTA ppl in ALOTA places

    SWP Flags Code:
    1. <Flags()> Public Enum SWP
    2.         SWP_NOSIZE = &H1
    3.         SWP_NOMOVE = &H2
    4.         SWP_NOZORDER = &H4
    5.         SWP_NOREDRAW = &H8
    6.         SWP_NOACTIVATE = &H10
    7.         SWP_FRAMECHANGED = &H20  ' The frame changed: send WM_NCCALCSIZE
    8.         SWP_SHOWWINDOW = &H40
    9.         SWP_HIDEWINDOW = &H80
    10.         SWP_NOCOPYBITS = &H100
    11.         SWP_NOOWNERZORDER = &H200  ' Don't do owner Z ordering
    12.         SWP_NOSENDCHANGING = &H400  ' Don't send WM_WINDOWPOSCHANGING
    13.         SWP_DEFERERASE = &H2000
    14.         SWP_ASYNCWINDOWPOS = &H4000
    15.     End Enum

    NOTE: Added Form with full Windows Message Enum in it, it's VERY long
    Attached Files Attached Files
    Last edited by spyk3; Mar 16th, 2010 at 03:28 PM. Reason: Adding Full WM enum

  2. #2

    Thread Starter
    Addicted Member spyk3's Avatar
    Join Date
    Apr 2009
    Location
    Dothan, AL
    Posts
    218

    Re: 2 Sweet Enums for System messages and window flags

    WindowsMessages Code:
    1. Public Enum WindowsMessages
    2.         ''' <summary>
    3.         '''The WM_ACTIVATE message is sent when a window is being activated or deactivated. This message is sent first to the window procedure of the top-level window being deactivated; it is then sent to the window procedure of the top-level window being activated.
    4.         ''' </summary>
    5.         ''' <remarks></remarks>
    6.         WM_ACTIVATE = &H6
    7.  
    8.         ''' <summary>
    9.         '''The WM_ACTIVATEAPP message is sent when a window belonging to a different application than the active window is about to be activated. The message is sent to the application whose window is being activated and to the application whose window is being deactivated.
    10.         ''' </summary>
    11.         ''' <remarks></remarks>
    12.         WM_ACTIVATEAPP = &H1C
    13.  
    14.         ''' <summary>
    15.         '''Definition Needed
    16.         ''' </summary>
    17.         ''' <remarks></remarks>
    18.         WM_AFXFIRST = &H360
    19.  
    20.         ''' <summary>
    21.         '''Definition Needed
    22.         ''' </summary>
    23.         ''' <remarks></remarks>
    24.         WM_AFXLAST = &H37F
    25.  
    26.         ''' <summary>
    27.         '''The WM_APP constant is used by applications to help define private messages usually of the form WM_APP+X where X is an integer value.
    28.         ''' </summary>
    29.         ''' <remarks></remarks>
    30.         WM_APP = &H8000
    31.  
    32.         ''' <summary>
    33.         '''The WM_ASKCBFORMATNAME message is sent to the clipboard owner by a clipboard viewer window to request the name of a CF_OWNERDISPLAY clipboard format.
    34.         ''' </summary>
    35.         ''' <remarks></remarks>
    36.         WM_ASKCBFORMATNAME = &H30C
    37.  
    38.         ''' <summary>
    39.         '''The WM_CANCELJOURNAL message is posted to an application when a user cancels the application's journaling activities. The message is posted with a NULL window handle.
    40.         ''' </summary>
    41.         ''' <remarks></remarks>
    42.         WM_CANCELJOURNAL = &H4B
    43.  
    44.         ''' <summary>
    45.         '''The WM_CANCELMODE message is sent to cancel certain modes such as mouse capture. For example the system sends this message to the active window when a dialog box or message box is displayed. Certain functions also send this message explicitly to the specified window regardless of whether it is the active window. For example the EnableWindow function sends this message when disabling the specified window.
    46.         ''' </summary>
    47.         ''' <remarks></remarks>
    48.         WM_CANCELMODE = &H1F
    49.  
    50.         ''' <summary>
    51.         '''The WM_CAPTURECHANGED message is sent to the window that is losing the mouse capture.
    52.         ''' </summary>
    53.         ''' <remarks></remarks>
    54.         WM_CAPTURECHANGED = &H215
    55.  
    56.         ''' <summary>
    57.         '''The WM_CHANGECBCHAIN message is sent to the first window in the clipboard viewer chain when a window is being removed from the chain.
    58.         ''' </summary>
    59.         ''' <remarks></remarks>
    60.         WM_CHANGECBCHAIN = &H30D
    61.  
    62.         ''' <summary>
    63.         '''An application sends the WM_CHANGEUISTATE message to indicate that the user interface (UI) state should be changed.
    64.         ''' </summary>
    65.         ''' <remarks></remarks>
    66.         WM_CHANGEUISTATE = &H127
    67.  
    68.         ''' <summary>
    69.         '''The WM_CHAR message is posted to the window with the keyboard focus when a WM_KEYDOWN message is translated by the TranslateMessage function. The WM_CHAR message contains the character code of the key that was pressed.
    70.         ''' </summary>
    71.         ''' <remarks></remarks>
    72.         WM_CHAR = &H102
    73.  
    74.         ''' <summary>
    75.         '''Sent by a list box with the LBS_WANTKEYBOARDINPUT style to its owner in response to a WM_CHAR message.
    76.         ''' </summary>
    77.         ''' <remarks></remarks>
    78.         WM_CHARTOITEM = &H2F
    79.  
    80.         ''' <summary>
    81.         '''The WM_CHILDACTIVATE message is sent to a child window when the user clicks the window's title bar or when the window is activated moved or sized.
    82.         ''' </summary>
    83.         ''' <remarks></remarks>
    84.         WM_CHILDACTIVATE = &H22

  3. #3

    Thread Starter
    Addicted Member spyk3's Avatar
    Join Date
    Apr 2009
    Location
    Dothan, AL
    Posts
    218

    Re: 2 Sweet Enums for System messages and window flags

    WM part2 Code:
    1. ''' <summary>
    2.         '''An application sends a WM_CLEAR message to an edit control or combo box to delete (clear) the current selection if any from the edit control.
    3.         ''' </summary>
    4.         ''' <remarks></remarks>
    5.         WM_CLEAR = &H303
    6.  
    7.         ''' <summary>
    8.         '''The WM_CLOSE message is sent as a signal that a window or an application should terminate.
    9.         ''' </summary>
    10.         ''' <remarks></remarks>
    11.         WM_CLOSE = &H10
    12.  
    13.         ''' <summary>
    14.         '''The WM_COMMAND message is sent when the user selects a command item from a menu when a control sends a notification message to its parent window or when an accelerator keystroke is translated.
    15.         ''' </summary>
    16.         ''' <remarks></remarks>
    17.         WM_COMMAND = &H111
    18.  
    19.         ''' <summary>
    20.         '''The WM_COMPACTING message is sent to all top-level windows when the system detects more than 12.5 percent of system time over a 30- to 60-second interval is being spent compacting memory. This indicates that system memory is low.
    21.         ''' </summary>
    22.         ''' <remarks></remarks>
    23.         WM_COMPACTING = &H41
    24.  
    25.         ''' <summary>
    26.         '''The system sends the WM_COMPAREITEM message to determine the relative position of a new item in the sorted list of an owner-drawn combo box or list box. Whenever the application adds a new item the system sends this message to the owner of a combo box or list box created with the CBS_SORT or LBS_SORT style.
    27.         ''' </summary>
    28.         ''' <remarks></remarks>
    29.         WM_COMPAREITEM = &H39
    30.  
    31.         ''' <summary>
    32.         '''The WM_CONTEXTMENU message notifies a window that the user clicked the right mouse button (right-clicked) in the window.
    33.         ''' </summary>
    34.         ''' <remarks></remarks>
    35.         WM_CONTEXTMENU = &H7B
    36.  
    37.         ''' <summary>
    38.         '''An application sends the WM_COPY message to an edit control or combo box to copy the current selection to the clipboard in CF_TEXT format.
    39.         ''' </summary>
    40.         ''' <remarks></remarks>
    41.         WM_COPY = &H301
    42.  
    43.         ''' <summary>
    44.         '''An application sends the WM_COPYDATA message to pass data to another application.
    45.         ''' </summary>
    46.         ''' <remarks></remarks>
    47.         WM_COPYDATA = &H4A
    48.  
    49.         ''' <summary>
    50.         '''The WM_CREATE message is sent when an application requests that a window be created by calling the CreateWindowEx or CreateWindow function. (The message is sent before the function returns.) The window procedure of the new window receives this message after the window is created but before the window becomes visible.
    51.         ''' </summary>
    52.         ''' <remarks></remarks>
    53.         WM_CREATE = &H1
    54.  
    55.         ''' <summary>
    56.         '''The WM_CTLCOLORBTN message is sent to the parent window of a button before drawing the button. The parent window can change the button's text and background colors. However only owner-drawn buttons respond to the parent window processing this message.
    57.         ''' </summary>
    58.         ''' <remarks></remarks>
    59.         WM_CTLCOLORBTN = &H135
    60.  
    61.         ''' <summary>
    62.         '''The WM_CTLCOLORDLG message is sent to a dialog box before the system draws the dialog box. By responding to this message the dialog box can set its text and background colors using the specified display device context handle.
    63.         ''' </summary>
    64.         ''' <remarks></remarks>
    65.         WM_CTLCOLORDLG = &H136
    66.  
    67.         ''' <summary>
    68.         '''An edit control that is not read-only or disabled sends the WM_CTLCOLOREDIT message to its parent window when the control is about to be drawn. By responding to this message the parent window can use the specified device context handle to set the text and background colors of the edit control.
    69.         ''' </summary>
    70.         ''' <remarks></remarks>
    71.         WM_CTLCOLOREDIT = &H133
    72.  
    73.         ''' <summary>
    74.         '''Sent to the parent window of a list box before the system draws the list box. By responding to this message the parent window can set the text and background colors of the list box by using the specified display device context handle.
    75.         ''' </summary>
    76.         ''' <remarks></remarks>
    77.         WM_CTLCOLORLISTBOX = &H134
    78.  
    79.         ''' <summary>
    80.         '''The WM_CTLCOLORMSGBOX message is sent to the owner window of a message box before Windows draws the message box. By responding to this message the owner window can set the text and background colors of the message box by using the given display device context handle.
    81.         ''' </summary>
    82.         ''' <remarks></remarks>
    83.         WM_CTLCOLORMSGBOX = &H132
    84.  
    85.         ''' <summary>
    86.         '''The WM_CTLCOLORSCROLLBAR message is sent to the parent window of a scroll bar control when the control is about to be drawn. By responding to this message the parent window can use the display context handle to set the background color of the scroll bar control.
    87.         ''' </summary>
    88.         ''' <remarks></remarks>
    89.         WM_CTLCOLORSCROLLBAR = &H137
    90.  
    91.         ''' <summary>
    92.         '''A static control or an edit control that is read-only or disabled sends the WM_CTLCOLORSTATIC message to its parent window when the control is about to be drawn. By responding to this message the parent window can use the specified device context handle to set the text and background colors of the static control.
    93.         ''' </summary>
    94.         ''' <remarks></remarks>
    95.         WM_CTLCOLORSTATIC = &H138
    96.  
    97.         ''' <summary>
    98.         '''An application sends a WM_CUT message to an edit control or combo box to delete (cut) the current selection if any in the edit control and copy the deleted text to the clipboard in CF_TEXT format.
    99.         ''' </summary>
    100.         ''' <remarks></remarks>
    101.         WM_CUT = &H300
    102.  
    103.         ''' <summary>
    104.         '''The WM_DEADCHAR message is posted to the window with the keyboard focus when a WM_KEYUP message is translated by the TranslateMessage function. WM_DEADCHAR specifies a character code generated by a dead key. A dead key is a key that generates a character such as the umlaut (double-dot) that is combined with another character to form a composite character. For example the umlaut-O character (?) is generated by typing the dead key for the umlaut character and then typing the O key.
    105.         ''' </summary>
    106.         ''' <remarks></remarks>
    107.         WM_DEADCHAR = &H103
    108.  
    109.         ''' <summary>
    110.         '''Sent to the owner of a list box or combo box when the list box or combo box is destroyed or when items are removed by the LB_DELETESTRING LB_RESETCONTENT CB_DELETESTRING or CB_RESETCONTENT message. The system sends a WM_DELETEITEM message for each deleted item. The system sends the WM_DELETEITEM message for any deleted list box or combo box item with nonzero item data.
    111.         ''' </summary>
    112.         ''' <remarks></remarks>
    113.         WM_DELETEITEM = &H2D
    114.  
    115.         ''' <summary>
    116.         '''The WM_DESTROY message is sent when a window is being destroyed. It is sent to the window procedure of the window being destroyed after the window is removed from the screen. This message is sent first to the window being destroyed and then to the child windows (if any) as they are destroyed. During the processing of the message it can be assumed that all child windows still exist.
    117.         ''' </summary>
    118.         ''' <remarks></remarks>
    119.         WM_DESTROY = &H2
    120.  
    121.         ''' <summary>
    122.         '''The WM_DESTROYCLIPBOARD message is sent to the clipboard owner when a call to the EmptyClipboard function empties the clipboard.
    123.         ''' </summary>
    124.         ''' <remarks></remarks>
    125.         WM_DESTROYCLIPBOARD = &H307
    126.  
    127.         ''' <summary>
    128.         '''Notifies an application of a change to the hardware configuration of a device or the computer.
    129.         ''' </summary>
    130.         ''' <remarks></remarks>
    131.         WM_DEVICECHANGE = &H219
    132.  
    133.         ''' <summary>
    134.         '''The WM_DEVMODECHANGE message is sent to all top-level windows whenever the user changes device-mode settings.
    135.         ''' </summary>
    136.         ''' <remarks></remarks>
    137.         WM_DEVMODECHANGE = &H1B
    138.  
    139.         ''' <summary>
    140.         '''The WM_DISPLAYCHANGE message is sent to all windows when the display resolution has changed.
    141.         ''' </summary>
    142.         ''' <remarks></remarks>
    143.         WM_DISPLAYCHANGE = &H7E
    144.  
    145.         ''' <summary>
    146.         '''The WM_DRAWCLIPBOARD message is sent to the first window in the clipboard viewer chain when the content of the clipboard changes. This enables a clipboard viewer window to display the new content of the clipboard.
    147.         ''' </summary>
    148.         ''' <remarks></remarks>
    149.         WM_DRAWCLIPBOARD = &H308
    150.  
    151.         ''' <summary>
    152.         '''The WM_DRAWITEM message is sent to the parent window of an owner-drawn button combo box list box or menu when a visual aspect of the button combo box list box or menu has changed.
    153.         ''' </summary>
    154.         ''' <remarks></remarks>
    155.         WM_DRAWITEM = &H2B
    156.  
    157.         ''' <summary>
    158.         '''Sent when the user drops a file on the window of an application that has registered itself as a recipient of dropped files.
    159.         ''' </summary>
    160.         ''' <remarks></remarks>
    161.         WM_DROPFILES = &H233
    162.  
    163.         ''' <summary>
    164.         '''The WM_ENABLE message is sent when an application changes the enabled state of a window. It is sent to the window whose enabled state is changing. This message is sent before the EnableWindow function returns but after the enabled state (WS_DISABLED style bit) of the window has changed.
    165.         ''' </summary>
    166.         ''' <remarks></remarks>
    167.         WM_ENABLE = &HA

  4. #4
    PowerPoster
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,070

    Re: 2 Sweet Enums for System messages and window flags

    Thanks, this could come in useful. I don't really use these messages alot but everytime I do use them, I have to spent minutes figuring out their value, because it's usually not mentioned on MSDN (which I can't understand at all...?).

  5. #5

    Thread Starter
    Addicted Member spyk3's Avatar
    Join Date
    Apr 2009
    Location
    Dothan, AL
    Posts
    218

    Re: 2 Sweet Enums for System messages and window flags

    Exactly my thoughts, but keep in mind, there were too many too list here, so for the complete list get the form in the zip file, it's a useless form but it has the entire enum in it, which, like i said, was way to large to list here (over 60K characters)
    Full explinations to each one, i just added it as a class in my visual studio and use it as needed :P

  6. #6
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    Re: 2 Sweet Enums for System messages and window flags

    To add to this, Paste is &H302:
    Code:
    Private Const WM_PASTE As Integer = &H302
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width