Borderless ComboBox
-
Can any on tell me how to remove borders from a Combobox. I tried SetWindowRegion, it worked for Edit control, but it did not work with Combobox Thanx :sigh:
Md. Humayuon Kabir Hemoo
modified on Saturday, February 16, 2008 12:55 PM
-
Can any on tell me how to remove borders from a Combobox. I tried SetWindowRegion, it worked for Edit control, but it did not work with Combobox Thanx :sigh:
Md. Humayuon Kabir Hemoo
modified on Saturday, February 16, 2008 12:55 PM
You could try removing any border styles from the window styles associated with the control. If a control's painting implementation ignores the style then you have no choice but to draw the control yourself. MArk
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
You could try removing any border styles from the window styles associated with the control. If a control's painting implementation ignores the style then you have no choice but to draw the control yourself. MArk
Mark Salsbery Microsoft MVP - Visual C++ :java:
Hi Mark, Thanks for your response. It seemes I need to draw the combobox my self. But don't you think SetWindowRegion should set the painting area of a control? Humayoun
Md. Humayuon Kabir Hemoo
-
Hi Mark, Thanks for your response. It seemes I need to draw the combobox my self. But don't you think SetWindowRegion should set the painting area of a control? Humayoun
Md. Humayuon Kabir Hemoo
Humayun Kabir Hemoo wrote:
But don't you think SetWindowRegion should set the painting area of a control?
Not necessarily. The control draws itself just like any other window. Whether the control sets its own region or not, or honors any of the styles you create it with, depends on the implementation. Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Can any on tell me how to remove borders from a Combobox. I tried SetWindowRegion, it worked for Edit control, but it did not work with Combobox Thanx :sigh:
Md. Humayuon Kabir Hemoo
modified on Saturday, February 16, 2008 12:55 PM
Do you want to customize combobox or remove border of it?
-
Do you want to customize combobox or remove border of it?
I want to remove the border.
Md. Humayuon Kabir Hemoo
-
Humayun Kabir Hemoo wrote:
But don't you think SetWindowRegion should set the painting area of a control?
Not necessarily. The control draws itself just like any other window. Whether the control sets its own region or not, or honors any of the styles you create it with, depends on the implementation. Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
I didn't know this before, thanx. By the way, removing WS_BORDER didn't work.
Md. Humayuon Kabir Hemoo
-
I want to remove the border.
Md. Humayuon Kabir Hemoo
So you can use of property window of combobox or use of
ModifyStyle(....)
for remove each style that you dont want it.