CComboBox without the client edge?
I am working on something similar to a grid control, and I have nearly all the cell types that I want, except for one. I can't get the CComboBox to fit in 16 pixels vertically, mainly because I can't make it lose the client edge it draws. I've tried ModifyStyleEx(WS_EX_CLIENTEDGE, 0) with no luck. I've looked on www.codeproject.com and codeguru without much luck. I found a control that looked like it might do it, but it just draws over the client edge area with a window colored rectangle, so that screws with neighboring cells. surely people have encountered this problem before?
Re: CComboBox without the client edge?
Combo box does not have WS_EX_CLIENTEDGE style. That is just a way combo draws itself.
Look for owner drawn examples.
Re: CComboBox without the client edge?
Quote:
Originally Posted by Kibble
... I can't get the CComboBox to fit in 16 pixels vertically...
Remember that a combo box is actually two windows. Have you tried resizing the edit window within? I've done this in the past with a subclassed combobox and it worked for me.
Re: CComboBox without the client edge?
The only way I know to change the height of a combo box (I'm talking about the edit box) is to change the size of its font.
As said JohnCz the client edge is by design, it is not a window style, and you can't remove it unless you use an ownerdraw combo box.
Then the height of the edit box of the combo box will be the font height+the pixels of the client edge (I think they are 8 pixels)
In order to change the width you can use either MoveWindow or SetWindowPos
Re: CComboBox without the client edge?
I wonder how did you do that?
It would be really helpful to see code that you used.
As far as I know, only changing a font size can change height of the combo.
Re: CComboBox without the client edge?
How do you access the edit control? This structure and related functions are undefined, I must have an old version of the SDK:
http://msdn.microsoft.com/library/de...mboboxinfo.asp
Re: CComboBox without the client edge?
I updated my platform SDK, it works now, as well as a ton of other **** that I couldn't do before. Thanks for the help.