开发者

Combobox style edit control in winAPI

开发者 https://www.devze.com 2023-01-15 20:39 出处:网络
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开发者_运

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:

  1. This doesn't seem like like "proper" way to make an edit control look that way.
  2. 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

0

精彩评论

暂无评论...
验证码 换一张
取 消