views:

76

answers:

2

Hi again,

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

A: 

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

gablin
I need an EDIT box that LOOKS like the edit part of a combobox.
Alexander Rafferty
I thought they looked the same. How do they differ?
gablin
+3  A: 

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

Elemental