Date: 02-16-2022
Return to Index
created by gbSnippets
'See bottom of page for list of control styles which cannot be
'changed during run-time.
'ANIMATION ==============================================================
ACS_AUTOPLAY
ACS_CENTER
ACS_TIMER
ACS_TRANSPARENT
'BUTTON =================================================================
BS_3STATE
BS_AUTO3STATE
BS_AUTOCHECKBOX
BS_AUTORADIOBUTTON
BS_BITMAP
BS_BOTTOM
BS_CENTER
BS_CHECKBOX
BS_COMMANDLINK
BS_DEFCOMMANDLINK
BS_DEFPUSHBUTTON
BS_DEFSPLITBUTTON
BS_FLAT
BS_GROUPBOX
BS_ICON
BS_LEFT
BS_LEFTTEXT
BS_MULTILINE
BS_NOTIFY
BS_OWNERDRAWN
BS_PUSHBUTTON
BS_PUSHLIKE
BS_RADIOBUTTON
BS_RIGHT
BS_RIGHTBUTTON
BS_SPLITBUTTON
BS_TEXT
BS_TOP
BS_TYPEMASK
BS_USERBUTTON
BS_VCENTER
'COMBOBOX =================================================================
CBS_AUTOHSCROLL
CBS_DISABLENOSCROLL
CBS_DROPDOWN
CBS_DROPDOWNLIST
CBS_HASSTRINGS
CBS_LOWERCASE
CBS_NOINTEGRALHEIGHT
CBS_OEMCONVERT
CBS_OWNERDRAWFIXED
CBS_OWNERDRAWVARIABLE
CBS_SIMPLE
CBS_SORT
CBS_UPPERCASE
'COMBOBOXEX =================================================================
CBES_EX_CASESENSITIVE
CBES_EX_NOEDITIMAGE
CBES_EX_NOEDITIMAGEINDENT
CBES_EX_NOSIZELIMIT
CBES_EX_PATHWORDBREAKPROC
CBES_EX_TEXTENDELLIPSIS
'DATE AND TIME PICKER =================================================================
DTS_APPCANPARSE
DTS_LONGDATAEFORMATE
DTS_RIGHTALIGN
DTS_SHOWNONE
DTS_SHORTDATEFORMAT
DTS_SHORTDATECENTURYFORMAT
DTS_TIMEFORMAT
DTS_UPDOWN
'STATIC =================================================================
SS_BITMAP
SS_BLACKFRAME
SS_BLACKRECT
SS_CENTER
SS_CENTERIMAGE
SS_EDITCONTROL
SS_ENDELLIPSIS
SS_ENHMETAFILE
SS_ETCHEDFRAME
SS_ETCHEDHORZ
SS_ETCHEDVERT
SS_GRAYFRAME
SS_GRAYRECT
SS_ICON
SS_LEFT
SS_LEFTNOWORDWRAP
SS_NOPREFIX
SS_NOTIFY
SS_OWNERDRAW
SS_PATHELLIPSIS
SS_REALSIZECONTROL
SS_REALSIZEIMAGE
SS_RIGHT
SS_RIGHTJUST
SS_SIMPLE
SS_SUNKEN
SS_TYPEMASK
SS_WHITEFRAME
SS_WHITERECT
SS_WORDELLIPSIS
'HEADER =================================================================
HDS_BUTTONS
HDS_DRAGDROP
HDS_FILTERBAR
HDS_FLAT
HDS_FULLDRAG
HDS_HIDDEN
HDS_HORZ
HDS_HOTTRACK
HDS_CHECKBOXES
HDS_NOSIZING
HDS_OVERFLOW
'LISTBOX =================================================================
LBS_COMBOBOX
LBS_DISABLENOSCROLL
LBS_EXTENDEDSEL
LBS_HASSTRINGS
LBS_MULTICOLUMN
LBS_MULTIPLESEL
LBS_NODATA
LBS_NOINTEGRALHEIGHT
LBS_NOREDRAW
LBS_NOSEL
LBS_NOTIFY
LBS_OWNERDRAWFIXED
LBS_OWNERDRAWVARIABLE
LBS_SORT
LBS_STANDARD
LBS_USETABSTOPS
LBS_WANTKEYBOARDINPUT
'LISTVIEW =================================================================
LVS_ALIGNLEFT
LVS_ALIGNMASK
LVS_ALIGNTOP
LVS_AUTOARRANGE
LVS_EDITLABELS
LVS_ICON
LVS_LIST
LVS_NOCOLUMNHEADER
LVS_NOLABELWRAP
LVS_NOSCROLL
LVS_NOSORTHEADER
LVS_OWNERDATA
LVS_OWNERDRAWFIXED
LVS_REPORT
LVS_SHAREIMAGELISTS
LVS_SHOWSELALWAYS
LVS_SINGLESEL
LVS_SMALLICON
LVS_SORTASCENDING
LVS_SORTDESCENDING
LVS_TYPEMASK
LVS_TYPESTYLEMASK
LVS_EX_AUTOAUTOARRANGE
LVS_EX_AUTOCHECKSELECT
LVS_EX_AUTOSIZECOLUMNS
LVS_EX_BORDERSELECT
LVS_EX_CHECKBOXES
LVS_EX_COLUMNOVERFLOW
LVS_EX_COLUMNSNAPPOINTS
LVS_EX_DOUBLEBUFFER
LVS_EX_FLATSB
LVS_EX_FULLROWSELECT
LVS_EX_GRIDLINES
LVS_EX_HEADERDRAGDROP
LVS_EX_HEADERINALLVIEWS
LVS_EX_HIDELABELS
LVS_EX_INFOTIP
LVS_EX_JUSTIFYCOLUMNS
LVS_EX_LABELTIP
LVS_EX_MULTIWORKAREAS
LVS_EX_ONECLICKACTIVATE
LVS_EX_REGIONAL
LVS_EX_SIMPLESELECT
LVS_EX_SINGLEROW
LVS_EX_SNAPTOGRID
LVS_EX_SUBITEMIMAGES
LVS_EX_TRACKSELECT
LVS_EX_TRANSPARENTBKGND
LVS_EX_TRANSPARENTSHADOWTEXT
LVS_EX_TWOCLICKACTIVATE
LVS_EX_UNDERLINECOLD
LVS_EX_UNDERLINEHOT
'MONTH CALENDAR =================================================================
MCS_DAYSTATE
MCS_MULTISELECT
MCS_WEEKNUMBERS
MCS_NOTODAYCIRCLE
MCS_NOTODAY
MCS_NOTRAILINGDATES
MCS_SHORTDAYSOFWEEK
MCS_NOSELCHANGEONNAV
'PAGER =================================================================
PGS_AUTOSCROLL
PGS_DRAGNDROP
PGS_HORZ
PGS_VERT
'REBAR =================================================================
RBS_AUTOSIZE
RBS_BANDBORDERS
RBS_DBLCLKTOGGLE
RBS_FIXEDORDER
RBS_REGISTERDROP
RBS_TOOLTIPS
RBS_VARHEIGHT
RBS_VERTICALGRIPPER
'RICHEDIT =================================================================
ES_DISABLENOSCROLL
ES_EX_NOCALLOLEINIT
ES_NOIME
ES_NOOLEDRAGDROP
ES_SAVESEL
ES_SELECTIONBAR
ES_SELFIME
ES_SUNKEN
ES_VERTICAL
ES_AUTOHSCROLL
ES_AUTOVSCROLL
ES_CENTER
ES_LEFT
ES_MULTILINE
ES_NOHIDESEL
ES_NUMBER
ES_PASSWORD
ES_READONLY
ES_RIGHT
ES_WANTRETURN
'PROGRESSBAR =================================================================
PBS_MARQUEE
PBS_SMOOTH
PBS_SMOOTHREVERSE
PBS_VERTICAL
'SCROLLBAR =================================================================
SBS_BOTTOMALIGN
SBS_HORZ
SBS_LEFTALIGN
SBS_RIGHTALIGN
SBS_SIZEBOX
SBS_SIZEBOXBOTTOMRIGHTALIGN
SBS_SIZEBOXTOPLEFTALIGN
SBS_SIZEGRIP
SBS_TOPALIGN
SBS_VERT
'STATUS BAR =================================================================
SBARS_SIZEGRIP
SBARS_TOOLTIPS
SBT_TOOLTIPS
'SYSLINK =================================================================
LWS_TRANSPARENT
LWS_IGNORERETURN
LWS_NOPREFIX
LWS_USEVISUALSTYLE
LWS_USECUSTOMTEXT
LWS_RIGHT
'TAB =================================================================
TCS_BOTTOM
TCS_BUTTONS
TCS_FIXEDWIDTH
TCS_FLATBUTTONS
TCS_FOCUSNEVER
TCS_FOCUSONBUTTONDOWN
TCS_FORCEICONLEFT
TCS_FORCELABELLEFT
TCS_HOTTRACK
TCS_MULTILINE
TCS_MULTISELECT
TCS_OWNERDRAWFIXED
TCS_RAGGEDRIGHT
TCS_RIGHT
TCS_RIGHTJUSTIFY
TCS_SCROLLOPPOSITE
TCS_SINGLELINE
TCS_TABS
TCS_TOOLTIPS
TCS_VERTICAL
TCS_EX_FLATSEPARATORS
TCS_EX_REGISTERDROP
'TEXTBOX =================================================================
ES_AUTOHSCROLL
ES_AUTOVSCROLL
ES_CENTER
ES_LEFT
ES_LOWERCASE
ES_MULTILINE
ES_NOHIDESEL
ES_NUMBER
ES_OEMCONVERT
ES_PASSWORD
ES_READONLY
ES_RIGHT
ES_UPPERCASE
ES_WANTRETURN
'TOOLBAR CONTROL and TOOLBAR BUTTONS =====================
TBSTYLE_ALTDRAG
TBSTYLE_CUSTOMERASE
TBSTYLE_FLAT
TBSTYLE_LIST
TBSTYLE_REGISTERDROP
TBSTYLE_TOOLTIPS
TBSTYLE_TRANSPARENT
TBSTYLE_WRAPABLE
BTNS_AUTOSIZE
BTNS_BUTTON
BTNS_CHECK
BTNS_CHECKGROUP
BTNS_DROPDOWN
BTNS_GROUP
BTNS_NOPREFIX
BTNS_SEP
BTNS_SHOWTEXT
BTNS_WHOLEDROPDOWN
TBSTYLE_EX_DRAWDDARROWS
TBSTYLE_EX_DOUBLEBUFFER
TBSTYLE_EX_HIDECLIPPEDBUTTONS
TBSTYLE_EX_MIXEDBUTTONS
TBSTYLE_EX_MULTICOLUMN
TBSTYLE_EX_VERTICAL
'TOOLTIP =================================================================
TTS_ALWAYSTIP
TTS_BALLOON
TTS_CLOSE
TTS_NOANIMATE
TTS_NOFADE
TTS_NOPREFIX
TTS_USEVISUALSTYLE
'TRACKBAR =================================================================
TBS_AUTOTICKS
TBS_VERT
TBS_HORZ
TBS_TOP
TBS_BOTTOM
TBS_LEFT
TBS_RIGHT
TBS_BOTH
TBS_NOTICKS
TBS_ENABLESELRANGE
TBS_FIXELENGTH
TBS_NOTHUMB
TBS_TOOLTIPS
TBS_REVERSED
TBS_DOWNISLEFT
TBS_NOTIFYBEFOREMOVE
TBS_TRANSPARENTBKGND
'TREEVIEW =================================================================
TVS_CHECKBOXES
TVS_DISABLEDRAGDROP
TVS_EDITLABELS
TVS_FULLROWSELECT
TVS_HASBUTTONS
TVS_HASLINES
TVS_INFOTIP
TVS_LINESATROOT
TVS_NOHSCROLL
TVS_NONEVENHEIGHT
TVS_NOSCROLL
TVS_NOTOOLTIPS
TVS_RTLREADING
TVS_SHOWSELALWAYS
TVS_SINGLEEXPAND
TVS_TRACKSELECT
TVS_EX_AUTOHSCROLL
TVS_EX_DIMMEDCHECKBOXES
TVS_EX_DOUBLEBUFFER
TVS_EX_DRAWIMAGEASYNC
TVS_EX_EXCLUSIONCHECKBOXES
TVS_EX_FADEINOUTEXPANDOS
TVS_EX_MULTISELECT
TVS_EX_NOINDENTSTATE
TVS_EX_NOSINGLECOLLAPSE
TVS_EX_PARTIALCHECKBOXES
TVS_EX_RICHTOOLTIP
'UPDOWN =================================================================
UDS_ALIGNLEFT
UDS_ALIGNRIGHT
UDS_ARROWKEYS
UDS_AUTOBUDDY
UDS_HORZ
UDS_HOTTRACK
UDS_NOTHOUSANDS
UDS_SETBUDDYINT
UDS_WRAP
'DIALOGS ============================================================'
DS_3DLOOK
DS_ABSALIGN
DS_CENTER
DS_CENTERMOUSE
DS_CONTEXTHELP
DS_CONTROL
DS_FIXEDSYS
DS_LOCALEDIT
DS_MODALFRAME
DS_NOFAILCREATE
DS_NOIDLEMSG
DS_SETFONT
DS_SETFOREGROUND
DS_SHELLFONT
DS_SYSMODAL
'WINDOWS =============================================================
http://msdn.microsoft.com/en-us/library/ms632595(VS.85).aspx
WS_BORDER
WS_CAPTION
WS_CHILD
WS_CHILDWINDOW
WS_CLIPCHILDREN
WS_CLIPSIBLINGS
WS_DISABLED change with EnableWindow
WS_DLGFRAME
WS_GROUP change with SetWindowLong
WS_HSCROLL
WS_ICONIC
WS_MAXIMIZE
WS_MAXIMIZEBOX
WS_OVERLAPPED
WS_OVERLAPPEDWINDOW
WS_POPUP
WS_POPUPWINDOW
WS_SIZEBOX
WS_SYSMENU
WS_TABSTOP change with SetWindowLong
WS_THICKFRAME
WS_TILED
WS_TILEDWINDOW
WS_VISIBLE turn on/off with ShowWindow or SetWindowPos
WS_VSCROLL
WS_EX_ACCEPTFILES
WS_EX_APPWINDOW
WS_EX_CLIENTEDGE
WS_EX_COMPOSITED
WS_EX_CONTEXTHELP
WS_EX_CONTROLPARENT
WS_EX_DLGMODALFRAME
WS_EX_LAYERED
WS_EX_LAYOUTRTL
WS_EX_LEFT
WS_EX_LEFTSCROLLBAR
WS_EX_LTRREADING
WS_EX_MDICHILD
WS_EX_NOACTIVATE - To activate the window, use the SetActiveWindow or SetForegroundWindow function.
WS_EX_NOINHERITLAYOUT
WS_EX_NOPARENTNOTIFY
WS_EX_OVERLAPPEDWINDOW
WS_EX_PALETTEWINDOW
WS_EX_RIGHT
WS_EX_RIGHTSCROLLBAR
WS_EX_RTLREADING
WS_EX_STATICEDGE
WS_EX_TOOLWINDOW
WS_EX_TOPMOST - To add or remove this style, use the SetWindowPos function.
WS_EX_TRANSPARENT - To achieve transparency without these restrictions, use the SetWindowRgn function.
WS_EX_WINDOWEDGE
'DIALOGS ============================================================
http://msdn.microsoft.com/en-us/library/ms632588(VS.85).aspx
DS_3DLOOK
DS_ABSALIGN
DS_CENTER
DS_CENTERMOUSE
DS_CONTEXTHELP
DS_CONTROL
DS_MODALFRAME
DS_NOFAILCREATE
DS_SETFONT
DS_SETFOREGROUND
DS_SYSMODAL
'=============================================================
'=============================================================
'Changing styles is usally done with SetWindowLong, but some
'controls do not support the use of SetWindowLong:
'ComboBoxEx
All Extended Styles - to change use CBEM_SetExtendedStyle
CBES_EX_CASESENSITIVE
CBES_EX_NOEDITIMAGE
CBES_EX_NOEDITIMAGEINDENT
CBES_EX_NOSIZELIMIT
CBES_EX_PATHWORDBREAKPROC
CBES_EX_TEXTENDELLIPSIS
'ToolBar --------------------------
All Extended Styles - to change use TB_SetExtendedStyle
TBSTYLE_EX_DRAWDDARROWS
TBSTYLE_EX_DOUBLEBUFFER
TBSTYLE_EX_HIDECLIPPEDBUTTONS
TBSTYLE_EX_MIXEDBUTTONS
TBSTYLE_EX_MULTICOLUMN
TBSTYLE_EX_VERTICAL
'TreeView --------------------------
TVS_CheckBoxes - once created, cannot remove (must re-create)
- must be set with SetWindowLong after creation
'ListBox Control --------------------
All styles cannot be modified after creation, with one exception:
LBS_COMBOBOX
LBS_DISABLENOSCROLL
LBS_EXTENDEDSEL
LBS_HASSTRINGS
LBS_MULTICOLUMN
LBS_MULTIPLESEL
LBS_NODATA
LBS_NOINTEGRALHEIGHT
LBS_NOSEL
LBS_NOTIFY
LBS_OWNERDRAWFIXED
LBS_OWNERDRAWVARIABLE
LBS_SORT
LBS_STANDARD
LBS_USETABSTOPS
LBS_WANTKEYBOARDINPUT
This style can be modified, but not with Set WindowLong
LBS_NOREDRAW - to change the redraw state of the control, use WM_SETREDRAW
'ListView Control ------------------------
All Extended Styles - to change use LVM_SetExtendedListViewStyle
LVS_EX_AUTOAUTOARRANGE
LVS_EX_AUTOCHECKSELECT
LVS_EX_AUTOSIZECOLUMNS
LVS_EX_BORDERSELECT
LVS_EX_CHECKBOXES
LVS_EX_COLUMNOVERFLOW
LVS_EX_COLUMNSNAPPOINTS
LVS_EX_DOUBLEBUFFER
LVS_EX_FLATSB
LVS_EX_FULLROWSELECT
LVS_EX_GRIDLINES
LVS_EX_HEADERDRAGDROP
LVS_EX_HEADERINALLVIEWS
LVS_EX_HIDELABELS
LVS_EX_INFOTIP
LVS_EX_JUSTIFYCOLUMNS
LVS_EX_LABELTIP
LVS_EX_MULTIWORKAREAS
LVS_EX_ONECLICKACTIVATE
LVS_EX_REGIONAL
LVS_EX_SIMPLESELECT
LVS_EX_SINGLEROW
LVS_EX_SNAPTOGRID
LVS_EX_SUBITEMIMAGES
LVS_EX_TRACKSELECT
LVS_EX_TRANSPARENTBKGND
LVS_EX_TRANSPARENTSHADOWTEXT
LVS_EX_TWOCLICKACTIVATE
LVS_EX_UNDERLINECOLD
LVS_EX_UNDERLINEHOT
'Edit Control ------------------------
These styles cannot be modified after creation:
ES_AUTOHSCROLL
ES_AUTOVSCROLL
ES_CENTER
ES_LEFT
ES_MULTILINE
ES_NOHIDESEL
ES_RIGHT
These styles can be modified, but not with SetWIndowLong
ES_PASSWORD - to change this style after the control has been created, use EM_SetPasswordChar
ES_READONLY - to change this style after the control has been created, use EM_SetReadOnly
'Windows --------------------------
These styles cannot be modified after creation:
WS_BORDER
WS_CAPTION
WS_CHILD
WS_CHILDWINDOW
WS_CLIPCHILDREN
WS_CLIPSIBLINGS
WS_DLGFRAME
WS_HSCROLL
WS_ICONIC
WS_MAXIMIZE
WS_MAXIMIZEBOX
WS_OVERLAPPED
WS_OVERLAPPEDWINDOW
WS_POPUP
WS_POPUPWINDOW
WS_SIZEBOX
WS_SYSMENU
WS_THICKFRAME
WS_TILED
WS_TILEDWINDOW
WS_VSCROLL
These styles can be modified, with SetWindowLong
WS_GROUP change with SetWindowLong
WS_TABSTOP change with SetWindowLong
These styles can be modified, but NOT with SetWindowLong
WS_DISABLED change with EnableWindow
WS_VISIBLE turn on/off with ShowWindow or SetWindowPos
These extended styles can be modified, but NOT with SetWindowLong
WS_EX_TOPMOST - To add or remove this style, use the SetWindowPos function.
'gbs_01161
'Date: 03-25-2012
http://www.garybeene.com/sw/gbsnippets.htm