如何检查窗口样式是否存在十六进制?

发布于 2024-08-02 11:40:03 字数 550 浏览 8 评论 0原文

我有一个关于窗口样式十六进制的问题。

根据 http://support.microsoft.com/kb/111011/en-us< /a>, 0x16CF0000 包含 WS_VISIBLEWS_CLIPSIBLINGSWS_CLIPCHILDRENWS_CAPTION 的窗口样式>、WS_SYSMENUWS_THICKFRAMEWS_MINIMIZEBOXWS_MAXIMIZEBOX

如何检查窗口样式组合中是否存在某种窗口样式?例如,我想检查 0x16CF0000 中是否存在 WS_BORDER (0x00800000) 样式。

I have a question regarding a window style hexadecimal.

According to http://support.microsoft.com/kb/111011/en-us, 0x16CF0000 contains window styles of WS_VISIBLE, WS_CLIPSIBLINGS, WS_CLIPCHILDREN, WS_CAPTION, WS_SYSMENU, WS_THICKFRAME, WS_MINIMIZEBOX, and WS_MAXIMIZEBOX.

How do I check if a window style exist in a combination of window styles? For example, I would like to check if WS_BORDER (0x00800000) style exists in 0x16CF0000.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

爱情眠于流年 2024-08-09 11:40:03

修复了我的错误的标准形式是:

if ((value & WS_BORDER) != 0) {  }

&将进行按位与,并且仅当设置 WS_BORDER 位时结果才会非零

The standard form with my bug fixed is:

if ((value & WS_BORDER) != 0) {  }

The & will do a bitwise-AND and only if the bit of WS_BORDER is set will the result be non-zero

还给你自由 2024-08-09 11:40:03

基本上,您只需检查 yourValue AND WS_BORDER = WS_BORDER 即可。

不幸的是,样式标志内的某些位被使用两次,具体取决于上下文,因此例如 WS_TABSTOPWS_MAXIMIZEBOX 都是 0x00010000,因此它取决于上下文(对象的位置,也许还有其他标志)窗口是否真的具有该属性(虽然父控件不能有制表位,但子控件有时可以有最大化框)...

WS_OVERLAPPED      = 0x00000000,
WS_POPUP           = 0x80000000,
WS_CHILD           = 0x40000000,
WS_MINIMIZE        = 0x20000000,
WS_VISIBLE         = 0x10000000,
WS_DISABLED        = 0x08000000,
WS_CLIPSIBLINGS    = 0x04000000,
WS_CLIPCHILDREN    = 0x02000000,
WS_MAXIMIZE        = 0x01000000,
WS_BORDER          = 0x00800000,
WS_DLGFRAME        = 0x00400000,
WS_VSCROLL         = 0x00200000,
WS_HSCROLL         = 0x00100000,
WS_SYSMENU         = 0x00080000,
WS_THICKFRAME      = 0x00040000,
WS_GROUP           = 0x00020000,
WS_TABSTOP         = 0x00010000,

WS_MINIMIZEBOX     = 0x00020000,
WS_MAXIMIZEBOX     = 0x00010000,

WS_CAPTION         = WS_BORDER | WS_DLGFRAME,
WS_TILED           = WS_OVERLAPPED,
WS_ICONIC          = WS_MINIMIZE,
WS_SIZEBOX         = WS_THICKFRAME,
WS_TILEDWINDOW     = WS_OVERLAPPEDWINDOW,

WS_OVERLAPPEDWINDOW    = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | 
                         WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX,
WS_POPUPWINDOW     = WS_POPUP | WS_BORDER | WS_SYSMENU,
WS_CHILDWINDOW     = WS_CHILD,

Basically, you can just check whether yourValue AND WS_BORDER = WS_BORDER.

Unfortunately, some of the bits inside of the style flags are used twice, depending on context, so for example both WS_TABSTOP and WS_MAXIMIZEBOX are 0x00010000, so it depends on the context (position of the object and maybe other flags) whether a window really has that property (while a parent control cannot have a tab stop, a child control sometimes can have a maximize box)...

WS_OVERLAPPED      = 0x00000000,
WS_POPUP           = 0x80000000,
WS_CHILD           = 0x40000000,
WS_MINIMIZE        = 0x20000000,
WS_VISIBLE         = 0x10000000,
WS_DISABLED        = 0x08000000,
WS_CLIPSIBLINGS    = 0x04000000,
WS_CLIPCHILDREN    = 0x02000000,
WS_MAXIMIZE        = 0x01000000,
WS_BORDER          = 0x00800000,
WS_DLGFRAME        = 0x00400000,
WS_VSCROLL         = 0x00200000,
WS_HSCROLL         = 0x00100000,
WS_SYSMENU         = 0x00080000,
WS_THICKFRAME      = 0x00040000,
WS_GROUP           = 0x00020000,
WS_TABSTOP         = 0x00010000,

WS_MINIMIZEBOX     = 0x00020000,
WS_MAXIMIZEBOX     = 0x00010000,

WS_CAPTION         = WS_BORDER | WS_DLGFRAME,
WS_TILED           = WS_OVERLAPPED,
WS_ICONIC          = WS_MINIMIZE,
WS_SIZEBOX         = WS_THICKFRAME,
WS_TILEDWINDOW     = WS_OVERLAPPEDWINDOW,

WS_OVERLAPPEDWINDOW    = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | 
                         WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX,
WS_POPUPWINDOW     = WS_POPUP | WS_BORDER | WS_SYSMENU,
WS_CHILDWINDOW     = WS_CHILD,
是你 2024-08-09 11:40:03
if(0x16CF0000 & WS_BORDER)
if(0x16CF0000 & WS_BORDER)
悲欢浪云 2024-08-09 11:40:03

检查 IF((0x16CF0000 | WS_BORDER) == 0x16CF0000)

Check IF((0x16CF0000 | WS_BORDER) == 0x16CF0000)

何以笙箫默 2024-08-09 11:40:03

过去,我采用了定义此类内容的头文件,并编写了一个脚本将其转换为代码,该代码将采用标志所在的变量并将其转换为包含常量符号名称的文本字符串。

在我使用 AWK 之类的东西来执行此操作的那天,解析 #defines 相当容易。现在,如果我当时使用的机器上有 Python,或者如果 Python 不容易使用,我会回到 AWK。

In the past, I have taken the header file where such things were defined and wrote a script to turn it into code that would take the Variable which the flags were and convert it into a text string containing the symbolic name of the constants.

Parsing #defines is rather easy back in the day I used something like AWK to do this. Now days, if I have it on the machine I'm using at the time, Python or if Python's not readily available I'd drop back to AWK.

ぇ气 2024-08-09 11:40:03

当我创建一个 win32 对话框生成器时,这个问题确实让我很担心。其中一项功能是设置所有 win32 通用控件以及用户定义控件的样式。通过观察和 MSDN 提供的少量文档,我学到了很多东西;我想分享我的信息。这将超出回答这个问题的范围。

Microsoft 团队如何格式化他们的窗口样式?

  1. 它们是适用于所有窗口的通用窗口样式。它们以“WS_”开头,位于高位。 0xffff0000。

  2. 然后是以其指定前缀开头的控件特定/用户定义样式。比如BS代表ButtonStyle,CBS代表ComboBoxStyle等等。它们位于低位。 0x0000ffff。

这两个级别的样式共有 5 种类型:

  1. 默认 - 这些样式等于 0。仅在以下情况下才选择此样式
    样式等于零。

  2. flag - 这些类型的样式永远不等于零,并且被放置在唯一的
    位。这意味着这些样式可以同时使用。

  3. exclusive - 这些类型的样式通常彼此共享位。但情况并非一定如此,因为 WS_POPUP 和 WS_CHILD 是独占的,但它们不共享位。大多数其他样式(例如 CBS_SIMPLE 和 CBS_DROPDOWN)都是独占的,并且实际上共享位。独特的风格通常代表一个类别。 BS_OWNERDRAW、BS_RADIOBUTTON、BS_PUSHBUTTON都代表按钮类别的类型。 BS_CENTER、BS_LEFT、BS_TOP 是对齐类别。请注意,BS_PUSHBUTTON 等于 0,表示类型类别的默认值。

  4. 复合 - 这些类型的样式由多种样式组成。例如 WS_OVERLAPPEDWINDOW、WS_POPUPWINDOW、DS_SHELLFONT、LBS_STANDARD。

  5. 同义词 - 这些类型的样式指的是同一事物。例如:WS_CHILDWINDOW 与 WS_CHILD、WS_TILED 与 WS_OVERLAPPED、WS_TILEDWINDOW 与 WS_OVERLAPPEDWINDOW。请注意,WS_TABSTOP 和 WS_MAXIMIZEBOX 共享相同的值,但它们不是同义词,因为它们在语义上不同。如何?这超出了我的知识范围。 WS_TABSTOP 应用于对话框中使用的控件,并且对话框实现正确的行为。但是,您可以使用 isDialogMessage 在对话框之外模拟相同的行为。子窗口可以有最大化框。对于我的应用程序,我完全忽略了 WS_TABSTOP 样式。

我们如何测试一种风格?
我创建了一个将样式转换为字符串的函数。但是,测试一种样式是否存在于另一种样式中的函数可能不切实际,因为这需要大量上下文。示例函数原型如下所示...

/** \param className - use WC_DIALOG for dialog window
                       use NULL for top level window
*/
bool hasWindowStyle(const char *className,UINT style,UINT requiredStyle);

className 将用作主要上下文。如果 className 是 WC_DIALOG,则所有 DS_* 样式均可用于该窗口。但它不能具有属于按钮类、编辑类等的样式。问题是,以下内容在技术上是错误的...

return (style & requiredStyle) == requiredStyle;

这是错误的,因为即使样式中存在 requiredStyle,也不意味着 requiredStyle 是该样式的有效样式特定的类名。这将要求我们拥有特定类的所有样式的映射,并且仅当该映射中存在 requiredStyle 时,才返回上述公式。

std::map<std::string,UINT> win32_class_list;

auto elem = win32_class_list.find(className);
auto invalid = win32_class_list.end();

if(elem == invalid) return false;
else return (style & requiredStyle) == requiredStyle;

以上解决了第一个问题。但最后一个问题似乎不太现实。假设您有一个必需的样式,即 CBS_SIMPLE|CBS_LOWERCASE。您如何确定所需的样式是否是组合框样式的一部分。这是一个非常切合实际的问题。

查看我的第 2 部分,了解将窗口样式转换为字符串的函数。

This question really concerned me as I was creating a win32 dialog builder. One of the features was setting the style of all win32 common controls, and also user defined controls. I have learnt alot via observation, and the little documentation provided by MSDN; and I wish to share my information. Which will go beyond answering this question.

How did the Microsoft team format their window styles?

  1. Their are general window styles that applies to all windows. They begin with 'WS_' and are found in the high order bits. 0xffff0000.

  2. Then there are Control specific/ user defined styles that begin with their specified prefix. Such as BS for ButtonStyle, CBS for ComboBoxStyle, and so on. They are found in the low order bits. 0x0000ffff.

There are 5 types in these two levels of styles:

  1. Default - These kinds of style are equal to zero. This style is only chosen if
    style is equal to zero.

  2. flag - These kinds of style never equates to zero, and are placed on unique
    bits. Meaning that these styles can be used simultaneously.

  3. exclusive - These kinds of styles normally share bits with each other. But this doesn't have to be the case as WS_POPUP and WS_CHILD are exclusive but they don't share bits. Most other styles such as CBS_SIMPLE and CBS_DROPDOWN are exclusive and indeed share bits. Exclusive styles often represent a category. BS_OWNERDRAW, BS_RADIOBUTTON, BS_PUSHBUTTON all represent the type of button category. BS_CENTER, BS_LEFT, BS_TOP are the alignment category. Note that BS_PUSHBUTTON is equal to zero and represents the Default for the type category.

  4. compound - These kinds of styles are comprised of multiply styles. Such as WS_OVERLAPPEDWINDOW, WS_POPUPWINDOW, DS_SHELLFONT, LBS_STANDARD.

  5. synonym - These kinds of styles refer to the same thing. Eg: WS_CHILDWINDOW vs WS_CHILD, WS_TILED vs WS_OVERLAPPED, WS_TILEDWINDOW vs WS_OVERLAPPEDWINDOW. Note that WS_TABSTOP and WS_MAXIMIZEBOX share the same value but they are not synonymns as they are semantically different. How? This is outside my scope of knowledge. WS_TABSTOP is applied to controls used in a dialog and the dialog implements the right behaviour. However, you can use isDialogMessage to simulate the same behaviour outside of a dialog. And child windows can have maximize box. For my application, I completely ignored WS_TABSTOP style.

How do we test for a style?
I created a function that converts a style to string. However, a function that test if a style exists in another style might be impractical, as this requires alot of context. A sample function prototype would look as follows...

/** \param className - use WC_DIALOG for dialog window
                       use NULL for top level window
*/
bool hasWindowStyle(const char *className,UINT style,UINT requiredStyle);

className would be used as the major context. If className is WC_DIALOG, then all of the DS_* styles are available to the window. But it cannot have styles that belong to the button class, edit class, etc. Problem is, the following is technically wrong...

return (style & requiredStyle) == requiredStyle;

This is faulty because, even if requiredStyle exist in style, doesnt mean that requiredStyle is a valid style for the particular className. This would require us to have a map of all styles of the particular class, and only if requiredStyle exist in that map, return the above formula.

std::map<std::string,UINT> win32_class_list;

auto elem = win32_class_list.find(className);
auto invalid = win32_class_list.end();

if(elem == invalid) return false;
else return (style & requiredStyle) == requiredStyle;

The above solved the first problem. But the last problem seems impractical to solve. Lets say you have a required style which is CBS_SIMPLE|CBS_LOWERCASE. How would you determine if this required style was apart of the combobox's style. This is a very contextual question.

Check out my Part 2 for a function that converts window style to string.

零時差 2024-08-09 11:40:03

第 2 部分

将窗口样式转换为字符串的通用函数。希望这对某人有用。请注意,由于篇幅原因,您必须实现以下两个函数原型。

Jav/string/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/string/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},
};

}

PART 2

A genaral function for converting a window style to string. Hope this is useful to some one. Note that due to space, you will have to implement the following two function prototypes.

Jav/string/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/string/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},
};

}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文