MFC function extension control BCGSuite for MFC help file: XML format of CBCGPEditCtrl

The BCGSuite library has more than 100 fully designed, tested and fully documented MFC extension classes whose components can be easily integrated into your application and save you hundreds of development and debugging time.

BCGSuite for MFC v31.0 official version download

This article introduces the format of the XML file used with CBCGPEditCtrl . The XML parser is called by calling CBCGPEditCtrl::LoadXMLSettings or CBCGPEditCtrl::LoadXMLSettingsFromBuffer .

The overall structure is as follows:

<SETTINGS>
<OPTIONS>
<WordDelimeters></WordDelimeters>
<SpecialDelimiters></SpecialDelimiters>
<IntelliSenseChars></IntelliSenseChars>
</OPTIONS>
<COLOR_DATA>
<EditTextColor></EditTextColor>
<EditBackColor></EditBackColor>
<SelTextColor></SelTextColor>
<SelBackColor></SelBackColor>
<KEYWORDS>
<Color></Color>
<BackColor></BackColor>
<CaseSensitive></CaseSensitive>
<Keyword></Keyword>
<Keyword></Keyword>
... more keywords ....
<Keyword></Keyword>
</KEYWORDS>
<WORDS>
<WORD>
<Val></Val>
<Color></Color>
<BackColor></BackColor>
<CaseSensitive></CaseSensitive>
</WORD>
... more WORDs ...
<WORD>
....... 
</WORD>
</WORDS>
<BLOCKS>
<BLOCK>
<Start></Start>
<End></End>
<Color></Color>
<BackColor></BackColor>
<WholeText></WholeText>
<CaseSensitive></CaseSensitive>
</BLOCK>
... more blocks ...
<BLOCK>
.......
</BLOCK>
<BLOCKS> 
</COLOR_DATA>
</SETTINGS>

Apart from the main "SETTINGS" label, there are no other mandatory labels.

The "OPTIONS" tag describes the common settings applied to the edit control.

The "COLOR_DATA" tag defines the color of regular edit controls, as well as the color of syntax highlighting and blocks.

The "KEYWORDS" tag is used for syntax highlighting definitions. It is useful when you need to define a set of keywords of the same color. For each keyword, the XML parser will call CBCGPEditCtrl::SetWordColor .

  • Color-clrFrgnd parameter
  • BackColor-clrBkgnd parameter
  • CaseSensitive-bCaseSensitive parameters
  • Keyword-strWord parameter

The "WORDS" tag is used to display individual words using various color settings. For each word, the XML parser will call CBCGPEditCtrl::SetWordColor .

The "WORD" tag represents a word.

  • Val-strWord parameters
  • Color-clrFrgnd parameter
  • BackColor-clrBkgnd parameter
  • CaseSensitive-bCaseSensitive parameters

The "BLOCKS" tag defines a list of color blocks. For each color block, the XML parser will call CBCGPEditCtrl :: SetBlockColor.

"BLOCK" mark represents a single color block

  • Start-strBlockOpen parameter
  • End-strBlockClose parameter
  • Color-clrFrgnd parameter
  • BackColor-clrBkgnd parameter
  • WholeText-bWholeText parameters
  • CaseSensitive-bCaseSensitive parameters

The following is a list of colors recognized by the XML parser:

  • black
  • darkred
  • darkgreen
  • brown
  • darkblue
  • darkmagenta
  • darkcyan
  • gray
  • darkgray
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white

For Boolean values, you can use "true" or "false".

Guess you like

Origin blog.csdn.net/AABBbaby/article/details/112508277