第2部分
用于将窗口样式转换为字符串的一般函数。希望这对某人有用。请注意,由于空间原因,您必须实现以下两个函数原型。
Jav/字符串/builder.h
/** \brief builds a string from parts and appends it to result.
\param result
\param format a format string similar to sprintf, except that '?' is
the only format specifier. C++ template system automatically
deduces the type and count of format specifiers.
\param arg first argument of parameter pack is always const char* in
this case.
\param REST... rest of parts. Can support any and every C++ type.
*/
template<class ...REST>
void buildString(std::string &result,const char *format,const char *arg,REST...);
Jav/字符串/numconv.h
/** \brief converts num to a hexidecimal string consisting of a
hexidecimal prefix '0x'.
*/
const char* hex_string(uint num);
win_styles.cpp
namespace {
enum { USER_DEFINED_STYLE_MASK = 0xffff };
struct ClassNameCompare
{
bool operator()(const char *lhs,const char *rhs)
{
return strcmp(lhs,rhs) < 0;
}
};
using Win32StyleExpert = void(*)(std::string&,uint,const char*);
using Win32ClassList = std::map<const char*,Win32StyleExpert,ClassNameCompare>;
extern Win32ClassList win32_class_list;
Win32StyleExpert getWin32StyleExpert(const char *className)
{
auto elem = win32_class_list.find(className);
return elem == win32_class_list.end() ? NULL : &elem->second;
}
}
std::string windowStyleToString(const char *className,uint style,const char *sep)
{
std::string s;
if( (style & WS_OVERLAPPEDWINDOW) == WS_OVERLAPPEDWINDOW ) buildString(s,"??","WS_OVERLAPPEDWINDOW",sep);
else
{
if( (style & WS_SIZEBOX) == WS_SIZEBOX ) buildString(s,"??","WS_SIZEBOX",sep);
if( (style & WS_MINIMIZEBOX) == WS_MINIMIZEBOX ) buildString(s,"??","WS_MINIMIZEBOX",sep);
if( (style & WS_MAXIMIZEBOX) == WS_MAXIMIZEBOX ) buildString(s,"??","WS_MAXIMIZEBOX",sep);
if( (style & WS_SYSMENU) == WS_SYSMENU ) buildString(s,"??","WS_SYSMENU",sep);
if( (style & WS_CAPTION) == WS_CAPTION ) buildString(s,"??","WS_CAPTION",sep);
else if( (style & WS_BORDER) == WS_BORDER ) buildString(s,"??","WS_BORDER",sep);
}
if( (style & WS_CHILD) == WS_CHILD )buildString(s,"??","WS_CHILD",sep);
else if( (style & WS_POPUP) == WS_POPUP ) buildString(s,"??","WS_POPUP",sep);
if( (style & WS_MINIMIZE) == WS_MINIMIZE ) buildString(s,"??","WS_MINIMIZE",sep);
if( (style & WS_MAXIMIZE) == WS_MAXIMIZE ) buildString(s,"??","WS_MAXIMIZE",sep);
if( (style & WS_DISABLED) == WS_DISABLED) buildString(s,"??","WS_DISABLED",sep);
if( (style & WS_HSCROLL) == WS_HSCROLL) buildString(s,"??","WS_HSCROLL",sep);
if( (style & WS_VSCROLL) == WS_VSCROLL) buildString(s,"??","WS_VSCROLL",sep);
if( (style & WS_VISIBLE) == WS_VISIBLE) buildString(s,"??","WS_VISIBLE",sep);
if( (style & WS_DLGFRAME) == WS_DLGFRAME && (style & WS_CAPTION) != WS_CAPTION)
buildString(s,"??","WS_DLGFRAME",sep);
if((int)className == (int)WC_DIALOG)
{
if( (style & DS_SHELLFONT) == DS_SHELLFONT ) buildString(s,"??","DS_SHELLFONT",sep);
else
{
if( (style & DS_FIXEDSYS) == DS_FIXEDSYS ) buildString(s,"??","DS_FIXEDSYS",sep);
if( (style & DS_SETFONT) == DS_SETFONT ) buildString(s,"??","DS_SETFONT",sep);
}
if( (style & DS_ABSALIGN) == DS_ABSALIGN ) buildString(s,"??","DS_ABSALIGN",sep);
if( (style & DS_CENTER) == DS_CENTER ) buildString(s,"??","DS_CENTER",sep);
if( (style & DS_CENTERMOUSE) == DS_CENTERMOUSE ) buildString(s,"??","DS_CENTERMOUSE",sep);
if( (style & DS_CONTEXTHELP) == DS_CONTEXTHELP ) buildString(s,"??","DS_CONTEXTHELP",sep);
if( (style & DS_CONTROL) == DS_CONTROL ) buildString(s,"??","DS_CONTROL",sep);
if( (style & DS_LOCALEDIT) == DS_LOCALEDIT ) buildString(s,"??","DS_LOCALEDIT",sep);
if( (style & DS_MODALFRAME) == DS_MODALFRAME ) buildString(s,"??","DS_MODALFRAME",sep);
if( (style & DS_NOFAILCREATE) == DS_NOFAILCREATE ) buildString(s,"??","DS_NOFAILCREATE",sep);
if( (style & DS_SETFOREGROUND) == DS_SETFOREGROUND ) buildString(s,"??","DS_SETFOREGROUND",sep);
}
else if(auto pushStyle = getWin32StyleExpert(className))
{
if(style == 0) return "0";
else pushStyle(s,style,sep);
}
else if( style == WS_OVERLAPPED ) return "WS_OVERLAPPED";
else if(className == NULL) buildString(s,"??",Jav::hex_str(style&USER_DEFINED_STYLE_MASK),sep);
if(s.empty()) return "";
s.pop_back(); //remove the last seperator added
return s;
}
namespace {
void pushAnimateControlStyle(std::string &s,uint style,const char *sep)
{
if( (style & ACS_AUTOPLAY) == ACS_AUTOPLAY ) buildString(s,"??","ACS_AUTOPLAY",sep);
if( (style & ACS_CENTER) == ACS_CENTER ) buildString(s,"??","ACS_CENTER",sep);
if( (style & ACS_TIMER) == ACS_TIMER ) buildString(s,"??","ACS_TIMER",sep);
}
void pushButtonStyle(std::string &s,uint style,const char *sep)
{
if( (style & 0xf) == BS_3STATE )buildString(s,"??","BS_3STATE",sep);
else if( (style & 0xf) == BS_AUTO3STATE ) buildString(s,"??","BS_AUTO3STATE",sep);
else if( (style & 0xf) == BS_AUTOCHECKBOX ) buildString(s,"??","BS_AUTOCHECKBOX",sep);
else if( (style & 0xf) == BS_AUTORADIOBUTTON ) buildString(s,"??","BS_AUTORADIOBUTTON",sep);
else if( (style & 0xf) == BS_CHECKBOX ) buildString(s,"??","BS_CHECKBOX",sep);
else if( (style & 0xf) == BS_DEFPUSHBUTTON ) buildString(s,"??","BS_DEFPUSHBUTTON",sep);
else if( (style & 0xf) == BS_GROUPBOX ) buildString(s,"??","BS_GROUPBOX",sep);
else if( (style & 0xf) == BS_OWNERDRAW ) buildString(s,"??","BS_OWNERDRAW",sep);
else if( (style & 0xf) == BS_RADIOBUTTON ) buildString(s,"??","BS_RADIOBUTTON",sep);
else buildString(s,"??","BS_PUSHBUTTON",sep);
if( (style & 0xc0) == BS_BITMAP )buildString(s,"??","BS_BITMAP",sep);
else if( (style & 0xc0) == BS_ICON )buildString(s,"??","BS_ICON",sep);
else buildString(s,"??","BS_TEXT",sep);
if( (style & 0xf00) == BS_CENTER )buildString(s,"??","BS_CENTER",sep);
else if( (style & 0xf00) == BS_VCENTER ) buildString(s,"??","BS_VCENTER",sep);
else if( (style & 0xf00) == BS_LEFT )buildString(s,"??","BS_LEFT",sep);
else if( (style & 0xf00) == BS_TOP )buildString(s,"??","BS_TOP",sep);
else if( (style & 0xf00) == BS_RIGHT )buildString(s,"??","BS_RIGHT",sep);
else if( (style & 0xf00) == BS_BOTTOM )buildString(s,"??","BS_BOTTOM",sep);
if( (style & BS_FLAT) == BS_FLAT )buildString(s,"??","BS_FLAT",sep);
if( (style & BS_MULTILINE) == BS_MULTILINE ) buildString(s,"??","BS_MULTILINE",sep);
if( (style & BS_NOTIFY) == BS_NOTIFY )buildString(s,"??","BS_NOTIFY",sep);
if( (style & BS_PUSHLIKE) == BS_PUSHLIKE ) buildString(s,"??","BS_PUSHLIKE",sep);
if( (style & BS_LEFTTEXT) == BS_LEFTTEXT ) buildString(s,"??","BS_LEFTTEXT",sep);
}
void pushComboBoxExStyle(std::string &s,uint style,const char *sep)
{
if( (style & CBES_EX_CASESENSITIVE) == CBES_EX_CASESENSITIVE ) buildString(s,"??","CBES_EX_CASESENSITIVE",sep);
if( (style & CBES_EX_NOEDITIMAGE) == CBES_EX_NOEDITIMAGE ) buildString(s,"??","CBES_EX_NOEDITIMAGE",sep);
if( (style & CBES_EX_NOEDITIMAGEINDENT) == CBES_EX_NOEDITIMAGEINDENT ) buildString(s,"??","CBES_EX_NOEDITIMAGEINDENT",sep);
if( (style & CBES_EX_NOSIZELIMIT) == CBES_EX_NOSIZELIMIT ) buildString(s,"??","CBES_EX_NOSIZELIMIT",sep);
if( (style & CBES_EX_PATHWORDBREAKPROC) == CBES_EX_PATHWORDBREAKPROC ) buildString(s,"??","CBES_EX_PATHWORDBREAKPROC",sep);
}
void pushComboBoxStyle(std::string &s,uint style,const char *sep)
{
if( (style & 3) == CBS_SIMPLE )buildString(s,"??","CBS_SIMPLE",sep);
else if( (style & 3) == CBS_DROPDOWN ) buildString(s,"??","CBS_DROPDOWN",sep);
else if( (style & 3) == CBS_DROPDOWNLIST ) buildString(s,"??","CBS_DROPDOWNLIST",sep);
if( (style & 0x30) == CBS_OWNERDRAWFIXED ) buildString(s,"??","CBS_OWNERDRAWFIXED",sep);
else if( (style & 0x30) == CBS_OWNERDRAWVARIABLE ) buildString(s,"??","CBS_OWNERDRAWVARIABLE",sep);
if( (style & 0x6000) == CBS_LOWERCASE ) buildString(s,"??","CBS_LOWERCASE",sep);
else if( (style & 0x6000) == CBS_UPPERCASE ) buildString(s,"??","CBS_UPPERCASE",sep);
if( (style & CBS_DISABLENOSCROLL) == CBS_DISABLENOSCROLL ) buildString(s,"??","CBS_DISABLENOSCROLL",sep);
if( (style & CBS_NOINTEGRALHEIGHT) == CBS_NOINTEGRALHEIGHT ) buildString(s,"??","CBS_NOINTEGRALHEIGHT",sep);
if( (style & CBS_SORT) == CBS_SORT )buildString(s,"??","CBS_SORT",sep);
if( (style & CBS_AUTOHSCROLL) == CBS_AUTOHSCROLL ) buildString(s,"??","CBS_AUTOHSCROLL",sep);
if( (style & CBS_OEMCONVERT) == CBS_OEMCONVERT ) buildString(s,"??","CBS_OEMCONVERT",sep);
}
void pushEditControlStyle(std::string &s,uint style,const char *sep)
{
if( (style & 0x3) == ES_CENTER )buildString(s,"??","ES_CENTER",sep);
else if( (style & 0x3) == ES_RIGHT )buildString(s,"??","ES_RIGHT",sep);
if( (style & 0x18) == ES_LOWERCASE ) buildString(s,"??","ES_LOWERCASE",sep);
else if( (style & 0x18) == ES_UPPERCASE ) buildString(s,"??","ES_UPPERCASE",sep);
if( (style & ES_AUTOHSCROLL) == ES_AUTOHSCROLL ) buildString(s,"??","ES_AUTOHSCROLL",sep);
if( (style & ES_AUTOVSCROLL) == ES_AUTOVSCROLL ) buildString(s,"??","ES_AUTOVSCROLL",sep);
if( (style & ES_MULTILINE) == ES_MULTILINE ) buildString(s,"??","ES_MULTILINE",sep);
if( (style & ES_NOHIDESEL) == ES_NOHIDESEL ) buildString(s,"??","ES_NOHIDESEL",sep);
if( (style & ES_NUMBER) == ES_NUMBER ) buildString(s,"??","ES_NUMBER",sep);
if( (style & ES_OEMCONVERT) == ES_OEMCONVERT ) buildString(s,"??","ES_OEMCONVERT",sep);
if( (style & ES_PASSWORD) == ES_PASSWORD ) buildString(s,"??","ES_PASSWORD",sep);
if( (style & ES_READONLY) == ES_READONLY ) buildString(s,"??","ES_READONLY",sep);
if( (style & ES_WANTRETURN) == ES_WANTRETURN ) buildString(s,"??","ES_WANTRETURN",sep);
}
void pushHeaderControlStyle(std::string &s,uint style,const char *sep)
{
if( (style & HDS_BUTTONS) == HDS_BUTTONS ) buildString(s,"??","HDS_BUTTONS",sep);
if( (style & HDS_DRAGDROP) == HDS_DRAGDROP ) buildString(s,"??","HDS_DRAGDROP",sep);
if( (style & HDS_FILTERBAR) == HDS_FILTERBAR ) buildString(s,"??","HDS_FILTERBAR",sep);
if( (style & HDS_FULLDRAG) == HDS_FULLDRAG ) buildString(s,"??","HDS_FULLDRAG",sep);
if( (style & HDS_HIDDEN) == HDS_HIDDEN ) buildString(s,"??","HDS_HIDDEN",sep);
if( (style & HDS_HORZ) == HDS_HORZ ) buildString(s,"??","HDS_HORZ",sep);
if( (style & HDS_HOTTRACK) == HDS_HOTTRACK ) buildString(s,"??","HDS_HOTTRACK",sep);
}
void pushListBoxStyle(std::string &s,uint style,const char *sep)
{
if( (style & 0x30) == LBS_OWNERDRAWFIXED ) buildString(s,"??","LBS_OWNERDRAWFIXED",sep);
else if( (style & 0x30) == LBS_OWNERDRAWVARIABLE ) buildString(s,"??","LBS_OWNERDRAWVARIABLE",sep);
if( (style & LBS_DISABLENOSCROLL) == LBS_DISABLENOSCROLL ) buildString(s,"??","LBS_DISABLENOSCROLL",sep);
if( (style & LBS_EXTENDEDSEL) == LBS_EXTENDEDSEL ) buildString(s,"??","LBS_EXTENDEDSEL",sep);
if( (style & LBS_HASSTRINGS) == LBS_HASSTRINGS ) buildString(s,"??","LBS_HASSTRINGS",sep);
if( (style & LBS_MULTICOLUMN) == LBS_MULTICOLUMN ) buildString(s,"??","LBS_MULTICOLUMN",sep);
if( (style & LBS_MULTIPLESEL) == LBS_MULTIPLESEL ) buildString(s,"??","LBS_MULTIPLESEL",sep);
if( (style & LBS_NODATA) == LBS_NODATA ) buildString(s,"??","LBS_NODATA",sep);
if( (style & LBS_NOINTEGRALHEIGHT) == LBS_NOINTEGRALHEIGHT ) buildString(s,"??","LBS_NOINTEGRALHEIGHT",sep);
if( (style & LBS_NOREDRAW) == LBS_NOREDRAW ) buildString(s,"??","LBS_NOREDRAW",sep);
if( (style & LBS_NOSEL) == LBS_NOSEL ) buildString(s,"??","LBS_NOSEL",sep);
if( (style & LBS_NOTIFY) == LBS_NOTIFY ) buildString(s,"??","LBS_NOTIFY",sep);
if( (style & LBS_SORT) == LBS_SORT ) buildString(s,"??","LBS_SORT",sep);
if( (style & LBS_USETABSTOPS) == LBS_USETABSTOPS ) buildString(s,"??","LBS_USETABSTOPS",sep);
if( (style & LBS_WANTKEYBOARDINPUT) == LBS_WANTKEYBOARDINPUT ) buildString(s,"??","LBS_WANTKEYBOARDINPUT",sep);
}
void pushListViewStyle(std::string &s,uint style,const char *sep)
{
if( (style & LVS_TYPEMASK) == LVS_REPORT ) buildString(s,"??","LVS_REPORT",sep);
else if( (style & LVS_TYPEMASK) == LVS_LIST ) buildString(s,"??","LVS_LIST",sep);
else if( (style & LVS_TYPEMASK) == LVS_SMALLICON ) buildString(s,"??","LVS_SMALLICON",sep);
else buildString(s,"??","LVS_ICON",sep);
if( (style & 0x30) == LVS_SORTASCENDING ) buildString(s,"??","LVS_SORTASCENDING",sep);
else if( (style & 0x30) == LVS_SORTDESCENDING ) buildString(s,"??","LVS_SORTDESCENDING",sep);
if( (style & LVS_ALIGNLEFT) == LVS_ALIGNLEFT ) buildString(s,"??","LVS_ALIGNLEFT",sep);
if( (style & LVS_NOCOLUMNHEADER) == LVS_NOCOLUMNHEADER ) buildString(s,"??","LVS_NOCOLUMNHEADER",sep);
if( (style & LVS_NOSORTHEADER) == LVS_NOSORTHEADER ) buildString(s,"??","LVS_NOSORTHEADER",sep);
if( (style & LVS_AUTOARRANGE) == LVS_AUTOARRANGE ) buildString(s,"??","LVS_AUTOARRANGE",sep);
if( (style & LVS_EDITLABELS) == LVS_EDITLABELS ) buildString(s,"??","LVS_EDITLABELS",sep);
if( (style & LVS_NOLABELWRAP) == LVS_NOLABELWRAP ) buildString(s,"??","LVS_NOLABELWRAP",sep);
if( (style & LVS_NOSCROLL) == LVS_NOSCROLL ) buildString(s,"??","LVS_NOSCROLL",sep);
if( (style & LVS_OWNERDATA) == LVS_OWNERDATA ) buildString(s,"??","LVS_OWNERDATA",sep);
if( (style & LVS_OWNERDRAWFIXED) == LVS_OWNERDRAWFIXED ) buildString(s,"??","LVS_OWNERDRAWFIXED",sep);
if( (style & LVS_SHAREIMAGELISTS) == LVS_SHAREIMAGELISTS ) buildString(s,"??","LVS_SHAREIMAGELISTS",sep);
if( (style & LVS_SHOWSELALWAYS) == LVS_SHOWSELALWAYS ) buildString(s,"??","LVS_SHOWSELALWAYS",sep);
if( (style & LVS_SINGLESEL) == LVS_SINGLESEL ) buildString(s,"??","LVS_SINGLESEL",sep);
}
void pushMonthCalendarControlStyle(std::string &s,uint style,const char *sep)
{
if( (style & MCS_DAYSTATE) == MCS_DAYSTATE ) buildString(s,"??","MCS_DAYSTATE",sep);
if( (style & MCS_MULTISELECT) == MCS_MULTISELECT ) buildString(s,"??","MCS_MULTISELECT",sep);
if( (style & MCS_WEEKNUMBERS) == MCS_WEEKNUMBERS ) buildString(s,"??","MCS_WEEKNUMBERS",sep);
if( (style & MCS_NOTODAYCIRCLE) == MCS_NOTODAYCIRCLE ) buildString(s,"??","MCS_NOTODAYCIRCLE",sep);
if( (style & MCS_NOTODAY) == MCS_NOTODAY ) buildString(s,"??","MCS_NOTODAY",sep);
}
void pushProgressBarStyle(std::string &s,uint style,const char *sep)
{
if( (style & PGS_AUTOSCROLL) == PGS_AUTOSCROLL ) buildString(s,"??","PGS_AUTOSCROLL",sep);
if( (style & PGS_DRAGNDROP) == PGS_DRAGNDROP ) buildString(s,"??","PGS_DRAGNDROP",sep);
if( (style & PGS_HORZ) == PGS_HORZ )buildString(s,"??","PGS_HORZ",sep);
if( (style & PGS_VERT) == PGS_VERT )buildString(s,"??","PGS_VERT",sep);
if( (style & PBS_SMOOTH) == PBS_SMOOTH ) buildString(s,"??","PBS_SMOOTH",sep)
if( (style & PBS_VERTICAL) == PBS_VERTICAL ) buildString(s,"??","PBS_VERTICAL",sep);
}
void pushReBarStyle(std::string &s,uint style,const char *sep)
{
if( (style & RBS_AUTOSIZE) == RBS_AUTOSIZE ) buildString(s,"??","RBS_AUTOSIZE",sep);
if( (style & RBS_BANDBORDERS) == RBS_BANDBORDERS ) buildString(s,"??","RBS_BANDBORDERS",sep);
if( (style & RBS_DBLCLKTOGGLE) == RBS_DBLCLKTOGGLE ) buildString(s,"??","RBS_DBLCLKTOGGLE",sep);
if( (style & RBS_FIXEDORDER) == RBS_FIXEDORDER ) buildString(s,"??","RBS_FIXEDORDER",sep);
if( (style & RBS_REGISTERDROP) == RBS_REGISTERDROP ) buildString(s,"??","RBS_REGISTERDROP",sep);
if( (style & RBS_TOOLTIPS) == RBS_TOOLTIPS ) buildString(s,"??","RBS_TOOLTIPS",sep);
if( (style & RBS_VARHEIGHT) == RBS_VARHEIGHT ) buildString(s,"??","RBS_VARHEIGHT",sep);
if( (style & RBS_VERTICALGRIPPER) == RBS_VERTICALGRIPPER ) buildString(s,"??","RBS_VERTICALGRIPPER",sep);
}
void pushScrollBarStyle(std::string &s,uint style,const char *sep)
{
if( (style & SBS_VERT) == SBS_VERT )buildString(s,"??","SBS_VERT",sep);
}
void pushStaticControlStyle(std::string &s,uint style,const char *sep)
{
if( (style & SS_TYPEMASK) == SS_BITMAP ) buildString(s,"??","SS_BITMAP",sep);
else if( (style & SS_TYPEMASK) == SS_BLACKFRAME ) buildString(s,"??","SS_BLACKFRAME",sep);
else if( (style & SS_TYPEMASK) == SS_BLACKRECT ) buildString(s,"??","SS_BLACKRECT",sep);
else if( (style & SS_TYPEMASK) == SS_CENTER ) buildString(s,"??","SS_CENTER",sep);
else if( (style & SS_TYPEMASK) == SS_ENHMETAFILE ) buildString(s,"??","SS_ENHMETAFILE",sep);
else if( (style & SS_TYPEMASK) == SS_ETCHEDFRAME ) buildString(s,"??","SS_ETCHEDFRAME",sep);
else if( (style & SS_TYPEMASK) == SS_ETCHEDHORZ ) buildString(s,"??","SS_ETCHEDHORZ",sep);
else if( (style & SS_TYPEMASK) == SS_ETCHEDVERT ) buildString(s,"??","SS_ETCHEDVERT",sep);
else if( (style & SS_TYPEMASK) == SS_GRAYFRAME ) buildString(s,"??","SS_GRAYFRAME",sep);
else if( (style & SS_TYPEMASK) == SS_GRAYRECT ) buildString(s,"??","SS_GRAYRECT",sep);
else if( (style & SS_TYPEMASK) == SS_ICON ) buildString(s,"??","SS_ICON",sep);
else if( (style & SS_TYPEMASK) == SS_LEFTNOWORDWRAP ) buildString(s,"??","SS_LEFTNOWORDWRAP",sep);
else if( (style & SS_TYPEMASK) == SS_OWNERDRAW ) buildString(s,"??","SS_OWNERDRAW",sep);
else if( (style & SS_TYPEMASK) == SS_RIGHT ) buildString(s,"??","SS_RIGHT",sep);
else if( (style & SS_TYPEMASK) == SS_SIMPLE ) buildString(s,"??","SS_SIMPLE",sep);
else if( (style & SS_TYPEMASK) == SS_WHITEFRAME ) buildString(s,"??","SS_WHITEFRAME",sep);
else if( (style & SS_TYPEMASK) == SS_WHITERECT ) buildString(s,"??","SS_WHITERECT",sep);
if( (style & SS_ELLIPSISMASK) == SS_PATHELLIPSIS ) buildString(s,"??","SS_PATHELLIPSIS",sep);
else if( (style & SS_ELLIPSISMASK) == SS_WORDELLIPSIS ) buildString(s,"??","SS_WORDELLIPSIS",sep);
else if( (style & SS_ELLIPSISMASK) == SS_ENDELLIPSIS ) buildString(s,"??","SS_ENDELLIPSIS",sep);
if( (style & SS_CENTERIMAGE) == SS_CENTERIMAGE ) buildString(s,"??","SS_CENTERIMAGE",sep);
if( (style & SS_NOPREFIX) == SS_NOPREFIX ) buildString(s,"??","SS_NOPREFIX",sep);
if( (style & SS_NOTIFY) == SS_NOTIFY ) buildString(s,"??","SS_NOTIFY",sep);
if( (style & SS_REALSIZEIMAGE) == SS_REALSIZEIMAGE ) buildString(s,"??","SS_REALSIZEIMAGE",sep);
if( (style & SS_RIGHTJUST) == SS_RIGHTJUST ) buildString(s,"??","SS_RIGHTJUST",sep);
if( (style & SS_SUNKEN) == SS_SUNKEN ) buildString(s,"??","SS_SUNKEN",sep);
}
void pushStatusBarStyle(std::string &s,uint style,const char *sep)
{
if( (style & SBARS_SIZEGRIP) == SBARS_SIZEGRIP ) buildString(s,"??","SBARS_SIZEGRIP",sep);
if( (style & SBT_TOOLTIPS) == SBT_TOOLTIPS ) buildString(s,"??","SBT_TOOLTIPS",sep);
}
void pushTabBarStyle(std::string &s,uint style,const char *sep)
{
if( (style & TCS_BOTTOM) == TCS_BOTTOM ) buildString(s,"??","TCS_BOTTOM",sep);
if( (style & TCS_BUTTONS) == TCS_BUTTONS ) buildString(s,"??","TCS_BUTTONS",sep);
if( (style & TCS_FIXEDWIDTH) == TCS_FIXEDWIDTH ) buildString(s,"??","TCS_FIXEDWIDTH",sep);
if( (style & TCS_FLATBUTTONS) == TCS_FLATBUTTONS ) buildString(s,"??","TCS_FLATBUTTONS",sep);
if( (style & TCS_FOCUSNEVER) == TCS_FOCUSNEVER ) buildString(s,"??","TCS_FOCUSNEVER",sep);
if( (style & TCS_FOCUSONBUTTONDOWN) == TCS_FOCUSONBUTTONDOWN ) buildString(s,"??","TCS_FOCUSONBUTTONDOWN",sep);
if( (style & TCS_FORCEICONLEFT) == TCS_FORCEICONLEFT ) buildString(s,"??","TCS_FORCEICONLEFT",sep);
if( (style & TCS_FORCELABELLEFT) == TCS_FORCELABELLEFT ) buildString(s,"??","TCS_FORCELABELLEFT",sep);
if( (style & TCS_HOTTRACK) == TCS_HOTTRACK ) buildString(s,"??","TCS_HOTTRACK",sep);
if( (style & TCS_MULTILINE) == TCS_MULTILINE ) buildString(s,"??","TCS_MULTILINE",sep);
if( (style & TCS_MULTISELECT) == TCS_MULTISELECT ) buildString(s,"??","TCS_MULTISELECT",sep);
if( (style & TCS_OWNERDRAWFIXED) == TCS_OWNERDRAWFIXED ) buildString(s,"??","TCS_OWNERDRAWFIXED",sep);
if( (style & TCS_RAGGEDRIGHT) == TCS_RAGGEDRIGHT ) buildString(s,"??","TCS_RAGGEDRIGHT",sep);
if( (style & TCS_RIGHT) == TCS_RIGHT ) buildString(s,"??","TCS_RIGHT",sep);
if( (style & TCS_RIGHTJUSTIFY) == TCS_RIGHTJUSTIFY ) buildString(s,"??","TCS_RIGHTJUSTIFY",sep);
if( (style & TCS_SCROLLOPPOSITE) == TCS_SCROLLOPPOSITE ) buildString(s,"??","TCS_SCROLLOPPOSITE",sep);
if( (style & TCS_SINGLELINE) == TCS_SINGLELINE ) buildString(s,"??","TCS_SINGLELINE",sep);
if( (style & TCS_TABS) == TCS_TABS )buildString(s,"??","TCS_TABS",sep);
if( (style & TCS_TOOLTIPS) == TCS_TOOLTIPS ) buildString(s,"??","TCS_TOOLTIPS",sep);
if( (style & TCS_VERTICAL) == TCS_VERTICAL ) buildString(s,"??","TCS_VERTICAL",sep);
}
void pushToolBarStyle(std::string &s,uint style,const char *sep)
{
if( (style & TBSTYLE_ALTDRAG) == TBSTYLE_ALTDRAG ) buildString(s,"??","TBSTYLE_ALTDRAG",sep);
if( (style & TBSTYLE_CUSTOMERASE) == TBSTYLE_CUSTOMERASE ) buildString(s,"??","TBSTYLE_CUSTOMERASE",sep);
if( (style & TBSTYLE_FLAT) == TBSTYLE_FLAT ) buildString(s,"??","TBSTYLE_FLAT",sep);
if( (style & TBSTYLE_LIST) == TBSTYLE_LIST ) buildString(s,"??","TBSTYLE_LIST",sep);
if( (style & TBSTYLE_REGISTERDROP) == TBSTYLE_REGISTERDROP ) buildString(s,"??","TBSTYLE_REGISTERDROP",sep);
if( (style & TBSTYLE_TOOLTIPS) == TBSTYLE_TOOLTIPS ) buildString(s,"??","TBSTYLE_TOOLTIPS",sep);
if( (style & TBSTYLE_TRANSPARENT) == TBSTYLE_TRANSPARENT ) buildString(s,"??","TBSTYLE_TRANSPARENT",sep);
if( (style & TBSTYLE_WRAPABLE) == TBSTYLE_WRAPABLE ) buildString(s,"??","TBSTYLE_WRAPABLE",sep);
}
void pushToolTipStyle(std::string &s,uint style,const char *sep)
{
if( (style & TTS_ALWAYSTIP) == TTS_ALWAYSTIP ) buildString(s,"??","TTS_ALWAYSTIP",sep);
if( (style & TTS_BALLOON) == TTS_BALLOON ) buildString(s,"??","TTS_BALLOON",sep);
if( (style & TTS_CLOSE) == TTS_CLOSE ) buildString(s,"??","TTS_CLOSE",sep);
if( (style & TTS_NOANIMATE) == TTS_NOANIMATE ) buildString(s,"??","TTS_NOANIMATE",sep);
if( (style & TTS_NOFADE) == TTS_NOFADE ) buildString(s,"??","TTS_NOFADE",sep);
if( (style & TTS_NOPREFIX) == TTS_NOPREFIX ) buildString(s,"??","TTS_NOPREFIX",sep);
}
void pushTrackBarStyle(std::string &s,uint style,const char *sep)
{
if( (style & TBS_AUTOTICKS) == TBS_AUTOTICKS ) buildString(s,"??","TBS_AUTOTICKS",sep);
if( (style & TBS_VERT) == TBS_VERT ) buildString(s,"??","TBS_VERT",sep);
if( (style & TBS_HORZ) == TBS_HORZ ) buildString(s,"??","TBS_HORZ",sep);
if( (style & TBS_TOP) == TBS_TOP ) buildString(s,"??","TBS_TOP",sep);
if( (style & TBS_BOTTOM) == TBS_BOTTOM ) buildString(s,"??","TBS_BOTTOM",sep);
if( (style & TBS_LEFT) == TBS_LEFT ) buildString(s,"??","TBS_LEFT",sep);
if( (style & TBS_RIGHT) == TBS_RIGHT ) buildString(s,"??","TBS_RIGHT",sep);
if( (style & TBS_BOTH) == TBS_BOTH ) buildString(s,"??","TBS_BOTH",sep);
if( (style & TBS_NOTICKS) == TBS_NOTICKS ) buildString(s,"??","TBS_NOTICKS",sep);
if( (style & TBS_ENABLESELRANGE) == TBS_ENABLESELRANGE ) buildString(s,"??","TBS_ENABLESELRANGE",sep);
if( (style & TBS_FIXEDLENGTH) == TBS_FIXEDLENGTH ) buildString(s,"??","TBS_FIXEDLENGTH",sep);
if( (style & TBS_NOTHUMB) == TBS_NOTHUMB ) buildString(s,"??","TBS_NOTHUMB",sep);
if( (style & TBS_TOOLTIPS) == TBS_TOOLTIPS ) buildString(s,"??","TBS_TOOLTIPS",sep);
if( (style & TBS_REVERSED) == TBS_REVERSED ) buildString(s,"??","TBS_REVERSED",sep);
if( (style & TBS_DOWNISLEFT) == TBS_DOWNISLEFT ) buildString(s,"??","TBS_DOWNISLEFT",sep);
}
void pushTreeViewStyle(std::string &s,uint style,const char *sep)
{
if( (style & TVS_CHECKBOXES) == TVS_CHECKBOXES ) buildString(s,"??","TVS_CHECKBOXES",sep);
if( (style & TVS_DISABLEDRAGDROP) == TVS_DISABLEDRAGDROP ) buildString(s,"??","TVS_DISABLEDRAGDROP",sep);
if( (style & TVS_EDITLABELS) == TVS_EDITLABELS ) buildString(s,"??","TVS_EDITLABELS",sep);
if( (style & TVS_FULLROWSELECT) == TVS_FULLROWSELECT ) buildString(s,"??","TVS_FULLROWSELECT",sep);
if( (style & TVS_HASBUTTONS) == TVS_HASBUTTONS ) buildString(s,"??","TVS_HASBUTTONS",sep);
if( (style & TVS_HASLINES) == TVS_HASLINES ) buildString(s,"??","TVS_HASLINES",sep);
if( (style & TVS_INFOTIP) == TVS_INFOTIP ) buildString(s,"??","TVS_INFOTIP",sep);
if( (style & TVS_LINESATROOT) == TVS_LINESATROOT ) buildString(s,"??","TVS_LINESATROOT",sep);
if( (style & TVS_NOHSCROLL) == TVS_NOHSCROLL ) buildString(s,"??","TVS_NOHSCROLL",sep);
if( (style & TVS_NONEVENHEIGHT) == TVS_NONEVENHEIGHT ) buildString(s,"??","TVS_NONEVENHEIGHT",sep);
if( (style & TVS_NOSCROLL) == TVS_NOSCROLL ) buildString(s,"??","TVS_NOSCROLL",sep);
if( (style & TVS_NOTOOLTIPS) == TVS_NOTOOLTIPS ) buildString(s,"??","TVS_NOTOOLTIPS",sep);
if( (style & TVS_RTLREADING) == TVS_RTLREADING ) buildString(s,"??","TVS_RTLREADING",sep);
if( (style & TVS_SHOWSELALWAYS) == TVS_SHOWSELALWAYS ) buildString(s,"??","TVS_SHOWSELALWAYS",sep);
if( (style & TVS_SINGLEEXPAND) == TVS_SINGLEEXPAND ) buildString(s,"??","TVS_SINGLEEXPAND",sep);
}
void pushUpDownControlStyle(std::string &s,uint style,const char *sep)
{
if( (style & UDS_ALIGNLEFT) == UDS_ALIGNLEFT ) buildString(s,"??","UDS_ALIGNLEFT",sep);
else if( (style & UDS_ALIGNRIGHT) == UDS_ALIGNRIGHT ) buildString(s,"??","UDS_ALIGNRIGHT",sep);
if( (style & UDS_ARROWKEYS) == UDS_ARROWKEYS ) buildString(s,"??","UDS_ARROWKEYS",sep);
if( (style & UDS_AUTOBUDDY) == UDS_AUTOBUDDY ) buildString(s,"??","UDS_AUTOBUDDY",sep);
if( (style & UDS_HORZ) == UDS_HORZ ) buildString(s,"??","UDS_HORZ",sep);
if( (style & UDS_HOTTRACK) == UDS_HOTTRACK ) buildString(s,"??","UDS_HOTTRACK",sep);
if( (style & UDS_NOTHOUSANDS) == UDS_NOTHOUSANDS ) buildString(s,"??","UDS_NOTHOUSANDS",sep);
if( (style & UDS_SETBUDDYINT) == UDS_SETBUDDYINT ) buildString(s,"??","UDS_SETBUDDYINT",sep);
if( (style & UDS_WRAP) == UDS_WRAP ) buildString(s,"??","UDS_WRAP",sep);
}
Win32ClassList win32_class_list =
{
{ANIMATE_CLASSA, pushAnimateControlStyle},
{WC_BUTTONA, pushButtonStyle,},
{WC_COMBOBOXEXA, pushComboBoxExStyle},
{WC_COMBOBOXA, pushComboBoxStyle},
{DATETIMEPICK_CLASSA, pushDateTimePickerStyle},
{WC_EDITA, pushEditControlStyle},
{WC_HEADERA, pushHeaderControlStyle},
{WC_LISTBOXA, pushListBoxStyle},
{WC_LISTVIEWA, pushListViewStyle},
{MONTHCAL_CLASSA, pushMonthCalendarControlStyle},
{PROGRESS_CLASSA, pushProgressBarStyle},
{REBARCLASSNAMEA, pushReBarStyle},
{WC_SCROLLBARA, pushScrollBarStyle},
{WC_STATICA, pushStaticControlStyle},
{STATUSCLASSNAMEA, pushStatusBarStyle},
{WC_TABCONTROLA, pushTabBarStyle},
{TOOLBARCLASSNAMEA, pushToolBarStyle},
{TOOLTIPS_CLASSA, pushToolTipStyle},
{TRACKBAR_CLASSA, pushTrackBarStyle},
{WC_TREEVIEWA, pushTreeViewStyle},
{UPDOWN_CLASSA,pushUpDownControlStyle},
};
}