COXSeparator 

Separator is an example of a simple but very useful control. Separators, placed in the right position in the dialog or form view, can greatly improve the way your applications look. 

Amazingly, there is no such control among common controls. So we decided to fill the gap. We introduce new class COXSeparator that was designed primarily to provide easy-to-use separator control. 

COXSeparator is derived from CStatic class so you can use standard static control to create an object in Dialog Editor. Then you have to associate CStatic object with the control using Class Wizard and replace the name of class CStatic with COXSeparator. 

If you specify any text while creating static control in Dialog Editor then it will be displayed in the separator control. And it will be placed on the base of static control styles that you specify (SS_LEFT, SS_RIGHT,SS_CENTER). In order to display just plain separator you shouldn't associate any text with static conrol in Dialog Editor or you should call SetWindowText(_T("")) function while initializing controls. By the way, you can use SetWindowText function to set any text to separator control at run-time. 

Static control provides the functionality to display only horizontally aligned text. We go further and provide the functionality to display separator and associated text vertically. In order to set/remove vertical alignment you have to call the following function:

SetVertOriented

By default we use horizontal orientation. 

Unfortunately only true type fonts can be used to display text vertically and usually default Windows font used in controls is not true type. Luckily you just can use standard SetFont function in order to set any font to separator control. 

We also provide customization functionality so you can specify the text color and Top/Left and Bottom/Right colors used to draw separator. Use following function in order to do that:

SetSeparatorColors
SetTextColor

Take a look at the "Separator" sample that demonstrate different separators. It can be found in .\Samples\GUI\Separator subdirectory of your Ultimate Toolbox directory.