I am programming in C, using the Windows API, and would like to know how I could draw separators. I would appreciate a code example.
Edit: Here's an illustration.
(source: microsoft.com)
There are many ways to draw a horizontal separator in HTML and CSS. The right way will depend on each case. In this article, I'm gonna show you the main ways to do it. Generally, the HTML tag <hr> (horizontal rule) is a semantic tag that's used to draw a horizontal line, separating elements horizontally.
Quick visual separators using the keyboard 2. Adding a paragraph border separator for lots more choice There is also a Horizontal Line tool you can use. 1. Position the cursor where the line is to be inserted.
Adding a paragraph border separator for lots more choice There is also a Horizontal Line tool you can use. 1. Position the cursor where the line is to be inserted. 2. Select the Home tab | Paragraph group, or Table Tools | Design tab (if you are working with a table). 3. Click the drop-down arrow on the Border icon.
Use contact paper. Measure and cut out a section of contact paper that is double the size of one side of the paper sheet. Remove the backing from the contact paper and slowly cover one side of the paper sheet. Smooth out any bubbles or wrinkles that form. Then enfold the other side of the paper, to cover the divider completely.
Use a static control/window with the SS_ETCHEDHORZ style (This is what explorer does and should give you the most accurate rendering when it comes to Visual Styles)
I don't suppose you're just looking for LineTo
?
For menus and toolbars, generally the separators are drawn for you by the menu and toolbar APIs. For random separators in dialog boxes, etc, like in the picture you added you can just draw a line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With