Download demo project - 52 KbDownload source files - 30 Kb
The class described here replaces a previous class I wrote, and supercedes Michael
Dunn's extension to my class.
This class provides the following options:
- A bevel line even if user has strange fonts
(have you ever created a sunken static with a height of 1 for a bevelline and tested your
program on a machine that has 200% larger fonts ?).
- Text rotates appropiately (usable with any font).
- Reacts properly on WM_ENABLEWINDOW.
- Might be used as an example for my
cdxCRot90DC (which you may find in the GDI section).
How to use (in a dialog):
- Add cdxCRotBevelLine.h, cdxCRotBevelLine.cpp, cdxCRot90DC.h and cdxCRot90DC.cpp to your
- Add a static control to your dialog resource.
Enter some appropiate text to it.
If your static's width is greater than its height the bevelline will appear horizontal,
If the bevelline is drawn vertically, the text is rotated by 90° degrees by default (left
hand examples of upper image).
To modify this, put a "~" in front of your control text (right hand bevels in
the upper image).
- Change its ID to something like
IDC_BEVEL_1, open classwizard and assign a member
variable, type control (
CStatic) to it (
m_wndBevel1 for example).
- Open your dialog class' header file.
Find the line
CStatic m_wndBevel1 and replace the
- Compile and run.
- This class may even be useful to you if you only need horizontal bevels.
Some people mentioned that it's enough to create a sunken static with a height of 1 (use
Alt while sizing the control) and to put another text control over it.
In fact, this will look really strange if the user choosed big fonts
for his display - the dialog resource will automatically adapt the the newly found font
and your height of 1 may become 3 or stuff - and suddenly friend user doesn't have a
bevelline but a sunken static.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.