locked
Reference document for Visual Styles RRS feed

  • Question

  • I am looking for a reference guide about the structure of the GUI elements when using and enhancing Visual Style themes.

    I know already, that there is the description of the UxTheme API somewhere in the MSDN.

    But, the most of these functions are kept very generic. They can be used for various parts and states - but I don´t know, which parts and states are supported by some concrete controls.

    Specially I have two questions at the moment:

    • I have an edit control and I see there is a little bit of space between the left/right border and the text.How can I determine the size of these margins?
    • I wish to make the width of the drop down button of combo boxes a little bit narrower. I found a way to resize the button while the combo box is not focused. But when the list is opened, the button is shown in its default style. Thus, how can I change the size of the button in this state of the combo box?

    You see, these are questions about how are the GUI elements composed or which properties are provided by these GUI elements. I don´t find answers to these questions in the API documentation.

    Thanks, regards
    Friedbert Widmann


    • Edited by Widmann Friday, April 15, 2016 6:18 PM
    Friday, April 15, 2016 6:17 PM

Answers

  • I have an edit control and I see there is a little bit of space between the left/right border and the text.How can I determine the size of these margins?
    Send the edit control an EM_GETMARGINS message to retrieve the info.  You can set the margins by sending EM_SETMARGINS to the edit control.

    • Proposed as answer by Hart Wang Monday, April 18, 2016 5:12 AM
    • Marked as answer by Hart Wang Monday, April 25, 2016 9:02 AM
    Friday, April 15, 2016 8:16 PM

All replies