|
-
August 25th, 2004, 02:05 AM
#1
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?
-
August 26th, 2004, 03:22 PM
#2
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.
There are only 10 types of people in the world:
Those who understand binary and those who do not.
-
August 26th, 2004, 03:38 PM
#3
Re: CComboBox without the client edge?
 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.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
-
August 26th, 2004, 04:12 PM
#4
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
-
August 26th, 2004, 04:30 PM
#5
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.
There are only 10 types of people in the world:
Those who understand binary and those who do not.
-
August 26th, 2004, 07:58 PM
#6
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
-
August 26th, 2004, 08:18 PM
#7
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|