Combobox style edit control in winAPI
In my winAPI project done in C++ (no MFC, no .net...), I am creating comboboxes in place of edit controls, because of the nice blue border. In many windows forms and dialogues, edit controls a开发者_运维知识库lso have this look. There are two problems:
- This doesn't seem like like "proper" way to make an edit control look that way.
- What if I wanted a multi-line edit box with that look.
So basically, how can I make an edit box with look of a combobox (the edit part of it, not the list part).
I think you are looking for the extended window styles; specifically WS_EX_CLIENTEDGE Specifies the 3d look.
If you are using a resource (dialog) editor there is probably a flag in the control properties. If you are coding directly this is a parameter in CreateWindowEx
Not sure I understand your question, but if you use a simple combobox (set style to CS_SIMPLE), then you get a box which can display multiple values over several lines without the dropdown list and also allows you to edit the currently selected value. At least that's how I've understood it according to this page: http://msdn.microsoft.com/en-us/library/bb775796%28VS.85%29.aspx
精彩评论