Older Version
Newer Version
JanetTerra
May 10, 2006
Reviewing the Stylebits Parameters
The four parameters of stylebits are AddBit, RemoveBit, AddExtendedBit, RemoveExtendedBit. For a review of these four parameters, and an introduction to Stylebits in general, please view Stylebits - Windows .
Stylebits and Formatted Text
Many of the stylebits commands used with windows and textboxes can also be used with statictext controls. Since statictext doesn't accept user input, most of the stylebits effects involve text formatting and borders. Statictext can be justified horizontally using these commands -
_ES_LEFTStatictext can also be centered vertically using the command -
_ES_CENTER
_ES_RIGHT
_SS_CENTERIMAGEIt is possible to create a nice etched look in your text using the command -
_WS_DISABLEDUse this strategy with caution, though. Any control disabled with the stylebits will require an API call to cause the statictext to later become enabled. The same look can be achieved using the native Liberty BASIC command !Disable and affords the programmer the opportunity to normalize the text look using !Enable later in the code.
There are some very interesting visual effects that can be achieved using a stylebits created border around your statictext.
These are just some examples of what you can do with stylebits and statictext. With experimentation, you may find more.
A List of Stylebits
You can get a list of all dwStyles and dwExStyles available with the Stylebits command at the MSDN Library Center .