![]() ![]() ![]() ![]() I tried for a little while to get vertically-drawn text, but it was pretty tricky to get the text aligned correctly Using ClassWizard,Ĭreate member variables of type CStatic for each separator, and then go to the ClassWizard-generated code and change No Prefix style, then you can use a shortcut key (i.e., put a & before a letter) just as with normal staticĪ sample dialog is pictured below, first in the resource editor, and then with the separators in action.Įach static control that will be used as a separator should have a real unique ID (not IDC_STATIC). Those are the only static control styles supported at this time. You can also set the alignment of the text (left, center, or right), and set the No When laying out horizontal separators, place your static controls as usual, but make them as wide as you want So you can judge where the line will appear. The line willīe drawn horizontally centered in the control, so it's a good idea to make the control the minimum width of 8 DLUs When laying out a vertical separator, make the static control as tall as you want the line to be. The code will work in Unicode apps, and should compile fine with 6.0 as Text to horizontal lines, so that's what I've done!ĬSeparator was written with MSVC 5.0. This class is an extension to Hans Buehler's original article "Control for drawing a bevel line." One of the enhancements he mentioned was adding Look like you're keeping up with Microsoft's ever-changing UI designs. This separator element is a nice alternative when you want to avoid really big or nested group boxes, or just ![]() The CSeparator class is an enhancement to standard static text controls that duplicates the look of the Office 97 products' options screens, like Word (pictured). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |