Alexander Rafferty
Alexander Rafferty

Reputation: 6233

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 also 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).

Upvotes: 0

Views: 1979

Answers (2)

Elemental
Elemental

Reputation: 7521

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

Upvotes: 3

gablin
gablin

Reputation: 4798

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

Upvotes: 0

Related Questions