Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

ClassStyles (Enums)
 
.
Summary
Summary

C# Definition:

[Flags]    
private enum ClassStyles : uint
public enum ClassStyles : uint
{
    /// <summary>Aligns the window's client area on a byte boundary (in the x direction). This style affects the width of the window and its horizontal placement on the display.</summary>
    ByteAlignClient = 0x1000,
    CS_VREDRAW         = 0x0001,
    CS_HREDRAW         = 0x0002,
    CS_DBLCLKS         = 0x0008,
    CS_OWNDC           = 0x0020,
    CS_CLASSDC         = 0x0040,
    CS_PARENTDC        = 0x0080,
    CS_NOCLOSE         = 0x0200,
    CS_SAVEBITS        = 0x0800,
    CS_BYTEALIGNCLIENT = 0x1000,
    CS_BYTEALIGNWINDOW = 0x2000,
    CS_GLOBALCLASS     = 0x4000,
    CS_IME             = 0x00010000,
    CS_DROPSHADOW      = 0x00020000
}

VB.NET Definition:

<Flags()> Public Enum ClassStyles As UInteger
    CS_VREDRAW         = &H1
    CS_HREDRAW         = &H2
    CS_DBLCLKS         = &H8
    CS_OWNDC           = &H20
    CS_CLASSDC         = &H40
    CS_PARENTDC        = &H80
    CS_NOCLOSE         = &H200
    CS_SAVEBITS        = &H800
    CS_BYTEALIGNCLIENT = &H1000
    CS_BYTEALIGNWINDOW = &H2000
    CS_GLOBALCLASS     = &H4000
    CS_IME             = &H10000
    CS_DROPSHADOW      = &H20000
End Enum

Notes:

None.

    /// <summary>Aligns the window on a byte boundary (in the x direction). This style affects the width of the window and its horizontal placement on the display.</summary>
    ByteAlignWindow = 0x2000,

    /// <summary>
    /// Allocates one device context to be shared by all windows in the class.
    /// Because window classes are process specific, it is possible for multiple threads of an application to create a window of the same class.
    /// It is also possible for the threads to attempt to use the device context simultaneously. When this happens, the system allows only one thread to successfully finish its drawing operation.
    /// </summary>
    ClassDC = 0x40,

    /// <summary>Sends a double-click message to the window procedure when the user double-clicks the mouse while the cursor is within a window belonging to the class.</summary>
    DoubleClicks = 0x8,

    /// <summary>
    /// Enables the drop shadow effect on a window. The effect is turned on and off through SPI_SETDROPSHADOW.
    /// Typically, this is enabled for small, short-lived windows such as menus to emphasize their Z order relationship to other windows.
    /// </summary>
    DropShadow = 0x20000,

    /// <summary>Indicates that the window class is an application global class. For more information, see the "Application Global Classes" section of About Window Classes.</summary>
    GlobalClass = 0x4000,

    /// <summary>Redraws the entire window if a movement or size adjustment changes the width of the client area.</summary>
    HorizontalRedraw = 0x2,

    /// <summary>Disables Close on the window menu.</summary>
    NoClose = 0x200,

    /// <summary>Allocates a unique device context for each window in the class.</summary>
    OwnDC = 0x20,

    /// <summary>
    /// Sets the clipping rectangle of the child window to that of the parent window so that the child can draw on the parent.
    /// A window with the CS_PARENTDC style bit receives a regular device context from the system's cache of device contexts.
    /// It does not give the child the parent's device context or device context settings. Specifying CS_PARENTDC enhances an application's performance.
    /// </summary>
    ParentDC = 0x80,

    /// <summary>
    /// Saves, as a bitmap, the portion of the screen image obscured by a window of this class.
    /// When the window is removed, the system uses the saved bitmap to restore the screen image, including other windows that were obscured.
    /// Therefore, the system does not send WM_PAINT messages to windows that were obscured if the memory used by the bitmap has not been discarded and if other screen actions have not invalidated the stored image.
    /// This style is useful for small windows (for example, menus or dialog boxes) that are displayed briefly and then removed before other screen activity takes place.
    /// This style increases the time required to display the window, because the system must first allocate memory to store the bitmap.
    /// </summary>
    SaveBits = 0x800,

    /// <summary>Redraws the entire window if a movement or size adjustment changes the height of the client area.</summary>
    VerticalRedraw = 0x1
}

VB.NET Definition:

<Flags()> Private Enum ClassStyles As UInteger
    ''' <summary>Aligns the window's client area on a byte boundary (in the x direction). This style affects the width of the window and its horizontal placement on the display.</summary>
    ByteAlignClient = &H1000

    ''' <summary>Aligns the window on a byte boundary (in the x direction). This style affects the width of the window and its horizontal placement on the display.</summary>
    ByteAlignWindow = &H2000

    ''' <summary>
    ''' Allocates one device context to be shared by all windows in the class.
    ''' Because window classes are process specific, it is possible for multiple threads of an application to create a window of the same class.
    ''' It is also possible for the threads to attempt to use the device context simultaneously. When this happens, the system allows only one thread to successfully finish its drawing operation.
    ''' </summary>
    ClassDC = &H40

    ''' <summary>Sends a double-click message to the window procedure when the user double-clicks the mouse while the cursor is within a window belonging to the class.</summary>
    DoubleClicks = &H8

    ''' <summary>
    ''' Enables the drop shadow effect on a window. The effect is turned on and off through SPI_SETDROPSHADOW.
    ''' Typically, this is enabled for small, short-lived windows such as menus to emphasize their Z order relationship to other windows.
    ''' </summary>
    DropShadow = &H20000

    ''' <summary>Indicates that the window class is an application global class. For more information, see the "Application Global Classes" section of About Window Classes.</summary>
    GlobalClass = &H4000

    ''' <summary>Redraws the entire window if a movement or size adjustment changes the width of the client area.</summary>
    HorizontalRedraw = &H2

    ''' <summary>Disables Close on the window menu.</summary>
    NoClose = &H200

    ''' <summary>Allocates a unique device context for each window in the class.</summary>
    OwnDC = &H20

    ''' <summary>
    ''' Sets the clipping rectangle of the child window to that of the parent window so that the child can draw on the parent.
    ''' A window with the CS_PARENTDC style bit receives a regular device context from the system's cache of device contexts.
    ''' It does not give the child the parent's device context or device context settings. Specifying CS_PARENTDC enhances an application's performance.
    ''' </summary>
    ParentDC = &H80

    ''' <summary>
    ''' Saves, as a bitmap, the portion of the screen image obscured by a window of this class.
    ''' When the window is removed, the system uses the saved bitmap to restore the screen image, including other windows that were obscured.
    ''' Therefore, the system does not send WM_PAINT messages to windows that were obscured if the memory used by the bitmap has not been discarded and if other screen actions have not invalidated the stored image.
    ''' This style is useful for small windows (for example, menus or dialog boxes) that are displayed briefly and then removed before other screen activity takes place.
    ''' This style increases the time required to display the window, because the system must first allocate memory to store the bitmap.
    ''' </summary>
    SaveBits = &H800

    ''' <summary>Redraws the entire window if a movement or size adjustment changes the height of the client area.</summary>
    VerticalRedraw = &H1
End Enum

Notes:

None.

Documentation
ClassStyles on MSDN
 

Please edit this page!

Do you have...

  • helpful tips?
  • corrections to the existing content?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it!

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions