XMLGUISyntax.cpp
上传用户:kj0090
上传日期:2007-03-02
资源大小:39k
文件大小:26k
源码类别:

xml/soap/webservice

开发平台:

C/C++

  1. /***********************************************************************
  2. *
  3. * This module is part of the XMLGUI system 
  4. *
  5. * File name:       XMLGUISyntax.cpp
  6. *
  7. * Creation date:   [14 AUGUST 2002] 
  8. *
  9. * Author(s):       [Kolosenko Ruslan]
  10. *
  11. * Description:     Initializes global structures describing XMLGUI syntax
  12. *
  13. **********************************************************************/
  14. #include "stdafx.h"
  15. #include "XMLGUISyntax.h"
  16. #ifdef _DEBUG
  17. #undef THIS_FILE
  18. static char THIS_FILE[]=__FILE__;
  19. #define new DEBUG_NEW
  20. #endif
  21.    // structure mapping common styles in string representation
  22.    // to values of Windows style constants
  23. XMLGUIStylesValues  g_CommonWindowStyles[] =
  24. {
  25. //   XMLGUI style            Window style
  26.     {_T("popup"),             WS_POPUP},
  27.     {_T("child"),             WS_CHILD},
  28.     {_T("minimize"),          WS_MINIMIZE},
  29.     {_T("visible"),           WS_VISIBLE},
  30.     {_T("disabled"),          WS_DISABLED},
  31.     {_T("clipsiblings"),      WS_CLIPSIBLINGS},
  32.     {_T("clipchildren"),      WS_CLIPCHILDREN},
  33.     {_T("maximize"),          WS_MAXIMIZE},
  34.     {_T("caption"),           WS_CAPTION},
  35.     {_T("border"),            WS_BORDER},
  36.     {_T("dlgframe"),          WS_DLGFRAME},
  37.     {_T("vscroll"),           WS_VSCROLL},
  38.     {_T("hscroll"),           WS_HSCROLL},
  39.     {_T("sysmenu"),           WS_SYSMENU},
  40.     {_T("thickframe"),        WS_THICKFRAME},
  41.     {_T("group"),             WS_GROUP},
  42.     {_T("tabstop"),           WS_TABSTOP},
  43.     {_T("minimizebox"),       WS_MINIMIZEBOX},
  44.     {_T("maximizebox"),       WS_MAXIMIZEBOX},
  45.     {_T("overlappedwindow"),  WS_OVERLAPPEDWINDOW},
  46.     {_T("popupwindow"),       WS_POPUPWINDOW},
  47.     {_T(""),                  0}    // terminating empty element
  48. };
  49.    // structure mapping common extended styles in string representation
  50.    // to values of Windows style constants
  51. XMLGUIStylesValues  g_CommonWindowExStyles[] =
  52. {
  53. //   XMLGUI style            Window style
  54.     {_T("dlgmodalframe"),     WS_EX_DLGMODALFRAME},
  55.     {_T("noparentnotify"),    WS_EX_NOPARENTNOTIFY},
  56.     {_T("topmost"),           WS_EX_TOPMOST},
  57.     {_T("acceptfiles"),       WS_EX_ACCEPTFILES},
  58.     {_T("extransparent"),     WS_EX_TRANSPARENT},
  59. #if(WINVER >= 0x0400)
  60.     {_T("mdichild"),          WS_EX_MDICHILD},
  61.     {_T("toolwindow"),        WS_EX_TOOLWINDOW},
  62.     {_T("windowedge"),        WS_EX_WINDOWEDGE},
  63.     {_T("clientedge"),        WS_EX_CLIENTEDGE},
  64.     {_T("excontexthelp"),     WS_EX_CONTEXTHELP},
  65.     {_T("exright"),           WS_EX_RIGHT},
  66.     {_T("exrtlreading"),      WS_EX_RTLREADING},
  67.     {_T("leftscrollbar"),     WS_EX_LEFTSCROLLBAR},
  68.     {_T("controlparent"),     WS_EX_CONTROLPARENT},
  69.     {_T("staticedge"),        WS_EX_STATICEDGE},
  70.     {_T("appwindow"),         WS_EX_APPWINDOW},
  71.     {_T("exoverlappedwindow"),WS_EX_OVERLAPPEDWINDOW},
  72.     {_T("palettewindow"),     WS_EX_PALETTEWINDOW},
  73. #endif /* WINVER >= 0x0400 */
  74.     {_T(""),                  0}    // terminating empty element
  75. };
  76.    // structure mapping dialog styles in string representation
  77.    // to values of Windows style constants for dialogs
  78. XMLGUIStylesValues  g_DialogStyles[] =
  79. {
  80. //   XMLGUI style            Windows style
  81.     {_T("absalign"),          DS_ABSALIGN},
  82.     {_T("sysmodal"),          DS_SYSMODAL},
  83.     {_T("localedit"),         DS_LOCALEDIT},
  84.     {_T("setfont"),           DS_SETFONT},
  85.     {_T("modalframe"),        DS_MODALFRAME},
  86.     {_T("noidlemsg"),         DS_NOIDLEMSG},
  87.     {_T("setforeground"),     DS_SETFOREGROUND},
  88. #if(WINVER >= 0x0400)
  89.     {_T("3dlook"),            DS_3DLOOK},
  90.     {_T("fixedsys"),          DS_FIXEDSYS},
  91.     {_T("nofailcreate"),      DS_NOFAILCREATE},
  92.     {_T("control"),           DS_CONTROL},
  93.     {_T("center"),            DS_CENTER},
  94.     {_T("centermouse"),       DS_CENTERMOUSE},
  95.     {_T("contexthelp"),       DS_CONTEXTHELP},
  96. #endif /* WINVER >= 0x0400 */
  97.     {_T(""),                  0}    // terminating empty element
  98. };
  99.    // structure mapping styles for Static controls in string representation
  100.    // to values of Windows style constants
  101. XMLGUIStylesValues  g_StaticControlStyles[] =
  102. {
  103. //   XMLGUI style            Window style
  104.     {_T("center"),            SS_CENTER},
  105.     {_T("right"),             SS_RIGHT},
  106.     {_T("simple"),            SS_SIMPLE},
  107.     {_T("leftnowordwrap"),    SS_LEFTNOWORDWRAP},
  108.     {_T("noprefix"),          SS_NOPREFIX},
  109. #if(WINVER >= 0x0400)
  110.     {_T("notify"),            SS_NOTIFY},
  111.     {_T("sunken"),            SS_SUNKEN},
  112.     {_T("endellipsis"),       SS_ENDELLIPSIS},
  113.     {_T("pathellipsis"),      SS_PATHELLIPSIS},
  114.     {_T("wordellipsis"),      SS_WORDELLIPSIS},
  115. #endif /* WINVER >= 0x0400 */
  116.     {_T(""),                  0}    // terminating empty element
  117. };
  118.    // structure mapping styles for Edit controls in string representation
  119.    // to values of Windows style constants
  120. XMLGUIStylesValues  g_EditControlStyles[] =
  121. {
  122. //   XMLGUI style            Window style
  123.     {_T("center"),            ES_CENTER},
  124.     {_T("right"),             ES_RIGHT},
  125.     {_T("multiline"),         ES_MULTILINE},
  126.     {_T("uppercase"),         ES_UPPERCASE},
  127.     {_T("lowercase"),         ES_LOWERCASE},
  128.     {_T("password"),          ES_PASSWORD},
  129.     {_T("autovscroll"),       ES_AUTOVSCROLL},
  130.     {_T("autohscroll"),       ES_AUTOHSCROLL},
  131.     {_T("nohidesel"),         ES_NOHIDESEL},
  132.     {_T("oemconvert"),        ES_OEMCONVERT},
  133.     {_T("readonly"),          ES_READONLY},
  134.     {_T("wantreturn"),        ES_WANTRETURN},
  135. #if(WINVER >= 0x0400)
  136.     {_T("number"),            ES_NUMBER},
  137. #endif /* WINVER >= 0x0400 */
  138.     {_T(""),                  0}    // terminating empty element
  139. };
  140.    // structure mapping styles for Button controls in string representation
  141.    // to values of Windows style constants
  142. XMLGUIStylesValues  g_ButtonControlStyles[] =
  143. {
  144. //   XMLGUI style            Window style
  145.     {_T("defpushbutton"),     BS_DEFPUSHBUTTON},
  146.     {_T("userbutton"),        BS_USERBUTTON},
  147.     {_T("ownerdraw"),         BS_OWNERDRAW},
  148. #if(WINVER >= 0x0400)
  149.     {_T("icon"),              BS_ICON},
  150.     {_T("bitmap"),            BS_BITMAP},
  151.     {_T("left"),              BS_LEFT},
  152.     {_T("right"),             BS_RIGHT},
  153.     {_T("center"),            BS_CENTER},
  154.     {_T("top"),               BS_TOP},
  155.     {_T("bottom"),            BS_BOTTOM},
  156.     {_T("vcenter"),           BS_VCENTER},
  157.     {_T("multiline"),         BS_MULTILINE},
  158.     {_T("notify"),            BS_NOTIFY},
  159.     {_T("flat"),              BS_FLAT},
  160. #endif /* WINVER >= 0x0400 */
  161.     {_T(""),                  0}    // terminating empty element
  162. };
  163.    // structure mapping styles for Check controls in string representation
  164.    // to values of Windows style constants
  165. XMLGUIStylesValues  g_CheckControlStyles[] =
  166. {
  167. //   XMLGUI style            Window style
  168.     {_T("checkbox"),          BS_CHECKBOX},
  169.     {_T("autocheckbox"),      BS_AUTOCHECKBOX},
  170.     {_T("3state"),            BS_3STATE},
  171.     {_T("auto3state"),        BS_AUTO3STATE},
  172.     {_T("lefttext"),          BS_LEFTTEXT},
  173. #if(WINVER >= 0x0400)
  174.     {_T("icon"),              BS_ICON},
  175.     {_T("bitmap"),            BS_BITMAP},
  176.     {_T("left"),              BS_LEFT},
  177.     {_T("right"),             BS_RIGHT},
  178.     {_T("center"),            BS_CENTER},
  179.     {_T("top"),               BS_TOP},
  180.     {_T("bottom"),            BS_BOTTOM},
  181.     {_T("vcenter"),           BS_VCENTER},
  182.     {_T("pushlike"),          BS_PUSHLIKE},
  183.     {_T("multiline"),         BS_MULTILINE},
  184.     {_T("notify"),            BS_NOTIFY},
  185.     {_T("flat"),              BS_FLAT},
  186. #endif /* WINVER >= 0x0400 */
  187.     {_T(""),                  0}    // terminating empty element
  188. };
  189.    // structure mapping styles for Radio controls in string representation
  190.    // to values of Windows style constants
  191. XMLGUIStylesValues  g_RadioControlStyles[] =
  192. {
  193. //   XMLGUI style            Window style
  194.     {_T("radiobutton"),       BS_RADIOBUTTON},
  195.     {_T("autoradiobutton"),   BS_AUTORADIOBUTTON},
  196.     {_T("lefttext"),          BS_LEFTTEXT},
  197. #if(WINVER >= 0x0400)
  198.     {_T("icon"),              BS_ICON},
  199.     {_T("bitmap"),            BS_BITMAP},
  200.     {_T("left"),              BS_LEFT},
  201.     {_T("right"),             BS_RIGHT},
  202.     {_T("center"),            BS_CENTER},
  203.     {_T("top"),               BS_TOP},
  204.     {_T("bottom"),            BS_BOTTOM},
  205.     {_T("vcenter"),           BS_VCENTER},
  206.     {_T("pushlike"),          BS_PUSHLIKE},
  207.     {_T("multiline"),         BS_MULTILINE},
  208.     {_T("notify"),            BS_NOTIFY},
  209.     {_T("flat"),              BS_FLAT},
  210. #endif /* WINVER >= 0x0400 */
  211.     {_T(""),                  0}    // terminating empty element
  212. };
  213.    // structure mapping styles for Group controls in string representation
  214.    // to values of Windows style constants
  215. XMLGUIStylesValues  g_GroupControlStyles[] =
  216. {
  217. //   XMLGUI style            Window style
  218.     {_T("groupbox"),          BS_GROUPBOX},
  219. #if(WINVER >= 0x0400)
  220.     {_T("icon"),              BS_ICON},
  221.     {_T("bitmap"),            BS_BITMAP},
  222.     {_T("left"),              BS_LEFT},
  223.     {_T("right"),             BS_RIGHT},
  224.     {_T("center"),            BS_CENTER},
  225.     {_T("notify"),            BS_NOTIFY},
  226.     {_T("flat"),              BS_FLAT},
  227. #endif /* WINVER >= 0x0400 */
  228.     {_T(""),                  0}    // terminating empty element
  229. };
  230.    // structure mapping styles for Combo controls in string representation
  231.    // to values of Windows style constants
  232. XMLGUIStylesValues  g_ComboControlStyles[] =
  233. {
  234. //   XMLGUI style            Window style
  235.     {_T("simple"),            CBS_SIMPLE},
  236.     {_T("dropdown"),          CBS_DROPDOWN},
  237.     {_T("dropdownlist"),      CBS_DROPDOWNLIST},
  238.     {_T("ownerdrawfixed"),    CBS_OWNERDRAWFIXED},
  239.     {_T("ownerdrawvariable"), CBS_OWNERDRAWVARIABLE},
  240.     {_T("autohscroll"),       CBS_AUTOHSCROLL},
  241.     {_T("oemconvert"),        CBS_OEMCONVERT},
  242.     {_T("sort"),              CBS_SORT},
  243.     {_T("hasstrings"),        CBS_HASSTRINGS},
  244.     {_T("nointegralheight"),  CBS_NOINTEGRALHEIGHT},
  245.     {_T("disablenoscroll"),   CBS_DISABLENOSCROLL},
  246. #if(WINVER >= 0x0400)
  247.     {_T("uppercase"),         CBS_UPPERCASE},
  248.     {_T("lowercase"),         CBS_LOWERCASE},
  249. #endif /* WINVER >= 0x0400 */
  250.     {_T(""),                  0}    // terminating empty element
  251. };
  252.    // structure mapping styles for List controls in string representation
  253.    // to values of Windows style constants
  254. XMLGUIStylesValues  g_ListControlStyles[] =
  255. {
  256. //   XMLGUI style            Window style
  257.     {_T("notify"),            LBS_NOTIFY},
  258.     {_T("sort"),              LBS_SORT},
  259.     {_T("noredraw"),          LBS_NOREDRAW},
  260.     {_T("multiplesel"),       LBS_MULTIPLESEL},
  261.     {_T("ownerdrawfixed"),    LBS_OWNERDRAWFIXED},
  262.     {_T("ownerdrawvariable"), LBS_OWNERDRAWVARIABLE},
  263.     {_T("hasstrings"),        LBS_HASSTRINGS},
  264.     {_T("usetabstops"),       LBS_USETABSTOPS},
  265.     {_T("nointegralheight"),  LBS_NOINTEGRALHEIGHT},
  266.     {_T("multicolumn"),       LBS_MULTICOLUMN},
  267.     {_T("wantkeyboardinput") ,LBS_WANTKEYBOARDINPUT},
  268.     {_T("extendedsel"),       LBS_EXTENDEDSEL},
  269.     {_T("disablenoscroll"),   LBS_DISABLENOSCROLL},
  270.     {_T("nodata"),            LBS_NODATA},
  271. #if(WINVER >= 0x0400)
  272.     {_T("nosel"),             LBS_NOSEL},
  273. #endif /* WINVER >= 0x0400 */
  274.     {_T("standard"),          LBS_STANDARD},
  275.     {_T(""),                  0}    // terminating empty element
  276. };
  277.    // structure mapping styles for Picture controls in string representation
  278.    // to values of Windows style constants
  279. XMLGUIStylesValues  g_PictureControlStyles[] =
  280. {
  281. //   XMLGUI style            Window style
  282.     {_T("icon"),              SS_ICON},
  283.     {_T("blackrect"),         SS_BLACKRECT},
  284.     {_T("grayrect"),          SS_GRAYRECT},
  285.     {_T("whiterect"),         SS_WHITERECT},
  286.     {_T("blackframe"),        SS_BLACKFRAME},
  287.     {_T("grayframe"),         SS_GRAYFRAME},
  288.     {_T("whiteframe"),        SS_WHITEFRAME},
  289.     {_T("useritem"),          SS_USERITEM},
  290. #if(WINVER >= 0x0400)
  291.     {_T("ownerdraw"),         SS_OWNERDRAW},
  292.     {_T("bitmap"),            SS_BITMAP},
  293.     {_T("enhmetafile"),       SS_ENHMETAFILE},
  294.     {_T("etchedhorz"),        SS_ETCHEDHORZ},
  295.     {_T("etchedvert"),        SS_ETCHEDVERT},
  296.     {_T("etchedframe"),       SS_ETCHEDFRAME},
  297.     {_T("typemask"),          SS_TYPEMASK},
  298.     {_T("notify"),            SS_NOTIFY},
  299.     {_T("centerimage"),       SS_CENTERIMAGE},
  300.     {_T("rightjust"),         SS_RIGHTJUST},
  301.     {_T("realsizeimage"),     SS_REALSIZEIMAGE},
  302.     {_T("sunken"),            SS_SUNKEN},
  303. #endif /* WINVER >= 0x0400 */
  304.     {_T(""),                  0}    // terminating empty element
  305. };
  306.    // structure mapping styles for ListEx controls in string representation
  307.    // to values of Windows style constants
  308. XMLGUIStylesValues  g_ListExControlStyles[] =
  309. {
  310. //   XMLGUI style            Window style
  311.     {_T("report"),            LVS_REPORT},
  312.     {_T("smallicon"),         LVS_SMALLICON},
  313.     {_T("list"),              LVS_LIST},
  314.     {_T("singlesel"),         LVS_SINGLESEL},
  315.     {_T("showselalways"),     LVS_SHOWSELALWAYS},
  316.     {_T("sortascending"),     LVS_SORTASCENDING},
  317.     {_T("sortdescending"),    LVS_SORTDESCENDING},
  318.     {_T("shareimagelists"),   LVS_SHAREIMAGELISTS},
  319.     {_T("nolabelwrap"),       LVS_NOLABELWRAP},
  320.     {_T("autoarrange"),       LVS_AUTOARRANGE},
  321.     {_T("editlabels"),        LVS_EDITLABELS},
  322. #if (_WIN32_IE >= 0x0300)
  323.     {_T("ownerdata"),         LVS_OWNERDATA},
  324. #endif /* _WIN32_IE >= 0x0300 */
  325.     {_T("noscroll"),          LVS_NOSCROLL},
  326.     {_T("typestylemask"),     LVS_TYPESTYLEMASK},
  327.     {_T("alignleft"),         LVS_ALIGNLEFT},
  328.     {_T("alignmask"),         LVS_ALIGNMASK},
  329.     {_T("ownerdrawfixed"),    LVS_OWNERDRAWFIXED},
  330.     {_T("nocolumnheader"),    LVS_NOCOLUMNHEADER},
  331.     {_T("nosortheader"),      LVS_NOSORTHEADER},
  332.     {_T(""),                  0}    // terminating empty element
  333. };
  334.    // structure mapping extended styles for ListEx controls in string representation
  335.    // to values of Windows style constants
  336. XMLGUIStylesValues  g_ListExControlExStyles[] =
  337. {
  338. //   XMLGUI style            Window style
  339.     {_T("gridlines"),         LVS_EX_GRIDLINES},
  340.     {_T("subitemimages"),     LVS_EX_SUBITEMIMAGES},
  341.     {_T("checkboxes"),        LVS_EX_CHECKBOXES},
  342.     {_T("trackselect"),       LVS_EX_TRACKSELECT},
  343.     {_T("headerdragdrop"),    LVS_EX_HEADERDRAGDROP},
  344.     {_T("fullrowselect"),     LVS_EX_FULLROWSELECT},
  345.     {_T("oneclickactivate"),  LVS_EX_ONECLICKACTIVATE},
  346.     {_T("twoclickactivate"),  LVS_EX_TWOCLICKACTIVATE},
  347. #if (_WIN32_IE >= 0x0400)
  348.     {_T("flatsb"),            LVS_EX_FLATSB},
  349.     {_T("regional"),          LVS_EX_REGIONAL},
  350.     {_T("infotip"),           LVS_EX_INFOTIP},
  351.     {_T("underlinehot"),      LVS_EX_UNDERLINEHOT},
  352.     {_T("underlinecold"),     LVS_EX_UNDERLINECOLD},
  353.     {_T("multiworkareas"),    LVS_EX_MULTIWORKAREAS},
  354. #endif /* _WIN32_IE >= 0x0400 */
  355.     {_T(""),                  0}    // terminating empty element
  356. };
  357.    // structure mapping extended styles for ComboEx controls in string representation
  358.    // to values of Windows style constants
  359. XMLGUIStylesValues  g_ComboExControlExStyles[] =
  360. {
  361. //   XMLGUI style            Window style
  362.     {_T("noeditimage"),       CBES_EX_NOEDITIMAGE},
  363.     {_T("noeditimageindent"), CBES_EX_NOEDITIMAGEINDENT},
  364.     {_T("pathwordbreakproc"), CBES_EX_PATHWORDBREAKPROC},
  365. #if (_WIN32_IE >= 0x0400)
  366.     {_T("nosizelimit"),       CBES_EX_NOSIZELIMIT},
  367.     {_T("casesensitive"),     CBES_EX_CASESENSITIVE},
  368. #endif /* _WIN32_IE >= 0x0400 */
  369.     {_T(""),                  0}    // terminating empty element
  370. };
  371.    // structure mapping styles for Spin controls in string representation
  372.    // to values of Windows style constants
  373. XMLGUIStylesValues  g_SpinControlStyles[] =
  374. {
  375. //   XMLGUI style            Window style
  376.     {_T("wrap"),              UDS_WRAP},
  377.     {_T("setbuddyint"),       UDS_SETBUDDYINT},
  378.     {_T("alignright"),        UDS_ALIGNRIGHT},
  379.     {_T("alignleft"),         UDS_ALIGNLEFT},
  380.     {_T("autobuddy"),         UDS_AUTOBUDDY},
  381.     {_T("arrowkeys"),         UDS_ARROWKEYS},
  382.     {_T("horz"),              UDS_HORZ},
  383.     {_T("nothousands"),       UDS_NOTHOUSANDS},
  384. #if (_WIN32_IE >= 0x0300)
  385.     {_T("hottrack"),          UDS_HOTTRACK},
  386. #endif /* _WIN32_IE >= 0x0300 */
  387.     {_T(""),                  0}    // terminating empty element
  388. };
  389.    // structure mapping styles for Scroll controls in string representation
  390.    // to values of Windows style constants
  391. XMLGUIStylesValues  g_ScrollControlStyles[] =
  392. {
  393. //   XMLGUI style            Window style
  394.     {_T("vert"),              SBS_VERT},
  395.     {_T("topalign"),          SBS_TOPALIGN},
  396.     {_T("leftalign"),         SBS_LEFTALIGN},
  397.     {_T("bottomalign"),       SBS_BOTTOMALIGN},
  398.     {_T("rightalign"),        SBS_RIGHTALIGN},
  399.     {_T("sizebox"),           SBS_SIZEBOX},
  400. #if(WINVER >= 0x0400)
  401.     {_T("sizegrip"),          SBS_SIZEGRIP},
  402. #endif /* WINVER >= 0x0400 */
  403.     {_T(""),                  0}    // terminating empty element
  404. };
  405.    // structure mapping styles for Tree controls in string representation
  406.    // to values of Windows style constants
  407. XMLGUIStylesValues  g_TreeControlStyles[] =
  408. {
  409. //   XMLGUI style            Window style
  410.     {_T("hasbuttons"),        TVS_HASBUTTONS},
  411.     {_T("haslines"),          TVS_HASLINES},
  412.     {_T("linesatroot"),       TVS_LINESATROOT},
  413.     {_T("editlabels"),        TVS_EDITLABELS},
  414.     {_T("disabledragdrop"),   TVS_DISABLEDRAGDROP},
  415.     {_T("showselalways"),     TVS_SHOWSELALWAYS},
  416. #if (_WIN32_IE >= 0x0300)
  417.     {_T("rtlreading"),        TVS_RTLREADING},
  418.     {_T("notooltips"),        TVS_NOTOOLTIPS},
  419.     {_T("checkboxes"),        TVS_CHECKBOXES},
  420.     {_T("trackselect"),       TVS_TRACKSELECT},
  421. #if (_WIN32_IE >= 0x0400)
  422.     {_T("singleexpand"),      TVS_SINGLEEXPAND},
  423.     {_T("infotip"),           TVS_INFOTIP},
  424.     {_T("fullrowselect"),     TVS_FULLROWSELECT},
  425.     {_T("noscroll"),          TVS_NOSCROLL},
  426.     {_T("nonevenheight"),     TVS_NONEVENHEIGHT},
  427. #endif /* _WIN32_IE >= 0x0400 */
  428. #endif /* _WIN32_IE >= 0x0300 */
  429.     {_T(""),                  0}    // terminating empty element
  430. };
  431.    // structure mapping styles for Tab controls in string representation
  432.    // to values of Windows style constants
  433. XMLGUIStylesValues  g_TabControlStyles[] =
  434. {
  435. //   XMLGUI style            Window style
  436.     {_T("buttons"),           TCS_BUTTONS},
  437.     {_T("multiline"),         TCS_MULTILINE},
  438.     {_T("fixedwidth"),        TCS_FIXEDWIDTH},
  439.     {_T("raggedright"),       TCS_RAGGEDRIGHT},
  440.     {_T("focusonbuttondown"), TCS_FOCUSONBUTTONDOWN},
  441.     {_T("ownerdrawfixed"),    TCS_OWNERDRAWFIXED},
  442.     {_T("tooltips"),          TCS_TOOLTIPS},
  443.     {_T("focusnever"),        TCS_FOCUSNEVER},
  444.     {_T("forceiconleft"),     TCS_FORCEICONLEFT},
  445.     {_T("forcelabelleft"),    TCS_FORCELABELLEFT},
  446. #if (_WIN32_IE >= 0x0300)
  447.     {_T("scrollopposite"),    TCS_SCROLLOPPOSITE},
  448.     {_T("bottom"),            TCS_BOTTOM},
  449.     {_T("right"),             TCS_RIGHT},
  450.     {_T("multiselect"),       TCS_MULTISELECT},
  451.     {_T("hottrack"),          TCS_HOTTRACK},
  452.     {_T("vertical"),          TCS_VERTICAL},
  453. #endif /* _WIN32_IE >= 0x0300 */
  454. #if (_WIN32_IE >= 0x0400)
  455.     {_T("flatbuttons"),       TCS_FLATBUTTONS},
  456. #endif /* _WIN32_IE >= 0x0400 */
  457.     {_T(""),                  0}    // terminating empty element
  458. };
  459.    // structure mapping extended styles for Tab controls in string representation
  460.    // to values of Windows style constants
  461. XMLGUIStylesValues  g_TabControlExStyles[] =
  462. {
  463. //   XMLGUI style            Window style
  464. #if (_WIN32_IE >= 0x0400)
  465.     {_T("flatseparators"),    TCS_EX_FLATSEPARATORS},
  466.     {_T("registerdrop"),      TCS_EX_REGISTERDROP},
  467. #endif /* _WIN32_IE >= 0x0400 */
  468.     {_T(""),                  0}    // terminating empty element
  469. };
  470.    // structure mapping styles for DateTime controls in string representation
  471.    // to values of Windows style constants
  472. XMLGUIStylesValues  g_DateTimeControlStyles[] =
  473. {
  474. //   XMLGUI style            Window style
  475.     {_T("updown"),            DTS_UPDOWN},
  476.     {_T("shownone"),          DTS_SHOWNONE},
  477.     {_T("longdateformat"),    DTS_LONGDATEFORMAT},
  478.     {_T("timeformat"),        DTS_TIMEFORMAT},
  479.     {_T("appcanparse"),       DTS_APPCANPARSE},
  480.     {_T("rightalign"),        DTS_RIGHTALIGN},
  481.     {_T(""),                  0}    // terminating empty element
  482. };
  483.    // structure mapping styles for MonthCal controls in string representation
  484.    // to values of Windows style constants
  485. XMLGUIStylesValues  g_MonthCalControlStyles[] =
  486. {
  487. //   XMLGUI style            Window style
  488.     {_T("daystate"),          MCS_DAYSTATE},
  489.     {_T("multiselect"),       MCS_MULTISELECT},
  490.     {_T("weeknumbers"),       MCS_WEEKNUMBERS},
  491.     {_T("notoday"),           MCS_NOTODAY},
  492. #if (_WIN32_IE >= 0x0400)
  493.     {_T("notodaycircle"),     MCS_NOTODAYCIRCLE},
  494. #endif /* _WIN32_IE >= 0x0400 */
  495.     {_T(""),                  0}    // terminating empty element
  496. };
  497.    // structure mapping styles for Slider controls in string representation
  498.    // to values of Windows style constants
  499. XMLGUIStylesValues  g_SliderControlStyles[] =
  500. {
  501. //   XMLGUI style            Window style
  502.     {_T("autoticks"),         TBS_AUTOTICKS},
  503.     {_T("vert"),              TBS_VERT},
  504.     {_T("top"),               TBS_TOP},
  505.     {_T("left"),              TBS_LEFT},
  506.     {_T("both"),              TBS_BOTH},
  507.     {_T("noticks"),           TBS_NOTICKS},
  508.     {_T("enableselrange"),    TBS_ENABLESELRANGE},
  509.     {_T("fixedlength"),       TBS_FIXEDLENGTH},
  510.     {_T("nothumb"),           TBS_NOTHUMB},
  511. #if (_WIN32_IE >= 0x0300)
  512.     {_T("tooltips"),          TBS_TOOLTIPS},
  513. #endif /* _WIN32_IE >= 0x0300 */
  514.     {_T(""),                  0}    // terminating empty element
  515. };
  516.    // structure mapping styles for Progress controls in string representation
  517.    // to values of Windows style constants
  518. XMLGUIStylesValues  g_ProgressControlStyles[] =
  519. {
  520. //   XMLGUI style            Window style
  521. #if (_WIN32_IE >= 0x0300)
  522.     {_T("smooth"),            PBS_SMOOTH},
  523.     {_T("vertical"),          PBS_VERTICAL},
  524. #endif /* _WIN32_IE >= 0x0300 */
  525.     {_T(""),                  0}    // terminating empty element
  526. };
  527.    // structure mapping styles for Animate controls in string representation
  528.    // to values of Windows style constants
  529. XMLGUIStylesValues  g_AnimateControlStyles[] =
  530. {
  531. //   XMLGUI style            Window style
  532.     {_T("center"),            ACS_CENTER},
  533.     {_T("transparent"),       ACS_TRANSPARENT},
  534.     {_T("autoplay"),          ACS_AUTOPLAY},
  535. #if (_WIN32_IE >= 0x0300)
  536.     {_T("timer"),             ACS_TIMER},
  537. #endif /* _WIN32_IE >= 0x0300 */
  538.     {_T(""),                  0}    // terminating empty element
  539. };
  540.    // structure mapping XMLGUI-style control class names to Windows class names,
  541.    // class name ordinals, style constants and default window styles
  542. XMLGUIControlSyntax g_ControlsSyntax[] =
  543. {
  544. //    XMLGUI      Windows             Class         Styles              Extended
  545. //    class        class              ordinal      constants        styles constants
  546. //                Default styles for the control
  547.     {L"Static",   L"Static",           0x0082, g_StaticControlStyles,   NULL,
  548.                    0},
  549.     {L"Edit",     L"Edit",             0x0081, g_EditControlStyles,     NULL,
  550.                   WS_TABSTOP|WS_BORDER|ES_AUTOHSCROLL},
  551.     {L"Button",   L"Button",           0x0080, g_ButtonControlStyles,   NULL,
  552.                   WS_TABSTOP|BS_PUSHBUTTON},
  553.     {L"Check",    L"Button",           0x0080, g_CheckControlStyles,    NULL,
  554.                   WS_TABSTOP|BS_CHECKBOX|BS_AUTOCHECKBOX},
  555.     {L"Radio",    L"Button",           0x0080, g_RadioControlStyles,    NULL,
  556.                   WS_TABSTOP|BS_AUTORADIOBUTTON},
  557.     {L"Group",    L"Button",           0x0080, g_GroupControlStyles,    NULL,
  558.                   BS_GROUPBOX},
  559.     {L"Combo",    L"Combo",            0x0085, g_ComboControlStyles,    NULL,
  560.                   WS_TABSTOP|WS_VSCROLL|CBS_SORT|CBS_DROPDOWN},
  561.     {L"List",     L"List",             0x0083, g_ListControlStyles,     NULL,
  562.                   WS_TABSTOP|WS_BORDER|WS_VSCROLL|LBS_SORT|LBS_NOINTEGRALHEIGHT},
  563.     {L"Picture",  L"Static",           0x0082, g_PictureControlStyles,  NULL,
  564.                   0},
  565.     {L"ListEx",   L"SysListView32",    0,      g_ListExControlStyles,   g_ListExControlExStyles,
  566.                   WS_TABSTOP|WS_BORDER},
  567.     {L"ComboEx",  L"ComboBoxEx32",     0,      g_ComboControlStyles,    g_ComboExControlExStyles,
  568.                   WS_TABSTOP|WS_VSCROLL|CBS_SORT|CBS_DROPDOWN},
  569.     {L"Spin",     L"msctls_updown32",  0,      g_SpinControlStyles,     NULL,
  570.                   UDS_ARROWKEYS},
  571.     {L"Scroll",   L"ScrollBar",        0x0084, g_ScrollControlStyles,   NULL,
  572.                   0},
  573.     {L"Tree",     L"SysTreeView32",    0,      g_TreeControlStyles,     NULL,
  574.                   WS_TABSTOP|WS_BORDER},
  575.     {L"Tab",      L"SysTabControl32",  0,      g_TabControlStyles,      g_TabControlExStyles,
  576.                   0},
  577.     {L"DateTime", L"SysDateTimePick32",0,      g_DateTimeControlStyles, NULL,
  578.                   WS_TABSTOP|DTS_RIGHTALIGN},
  579.     {L"MonthCal", L"SysMonthCal32",    0,      g_MonthCalControlStyles, NULL,
  580.                   WS_TABSTOP|MCS_NOTODAY},
  581.     {L"Slider",   L"msctls_trackbar32",0,      g_SliderControlStyles,   NULL,
  582.                   WS_TABSTOP|TBS_BOTH|TBS_NOTICKS},
  583.     {L"IPAddress",L"SysIPAddress32",   0,      NULL,                    NULL,
  584.                   WS_TABSTOP},
  585.     {L"Progress", L"msctls_progress32",0,      g_ProgressControlStyles, NULL,
  586.                   WS_BORDER},
  587.     {L"Animate",  L"SysAnimate32",     0,      g_AnimateControlStyles,  NULL,
  588.                   WS_TABSTOP|WS_BORDER},
  589.     {L"HotKey",   L"msctls_hotkey32",  0,      NULL,                    NULL,
  590.                   WS_TABSTOP|WS_BORDER},
  591.     {L"",         L"",                 0,      NULL,                    NULL,
  592.                   0}    // terminating empty element
  593. };