|
-
Apr 23rd, 2010, 12:58 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] Change Combbox Edit Box Backcolor
Hi, I been makeing my own Web Browser for the last few days, Now i thought of idea that when a user goes to a sercure server like https: I like the Combo Box that I type urls into the Edit box to go green, and if the site is just a normal http: I like it to be white, is I know how to get the Hwnd of the edit field but not sure how to set the back color, Hope someone can help, Sorry about my bad spelling.
-
Apr 23rd, 2010, 01:00 PM
#2
Re: Change Combbox Edit Box Backcolor
-
Apr 23rd, 2010, 01:05 PM
#3
Re: Change Combbox Edit Box Backcolor
If you are making your own browser then why do you need the handle for a combo box you already control?
-
Apr 23rd, 2010, 01:45 PM
#4
Thread Starter
Fanatic Member
Re: Change Combbox Edit Box Backcolor
The combobox is were I type the address, baja_yu I need to chnage just the edit part of the combobox you know the textbox but the rest of the drop down items will be white.
-
Apr 23rd, 2010, 01:49 PM
#5
Re: Change Combbox Edit Box Backcolor
Changing the Forecolor will change the color of the text, but it will change it for ALL items in the combo.
Changing the backcolor will change the backcolor of the entire control.
-
Apr 23rd, 2010, 01:55 PM
#6
Thread Starter
Fanatic Member
Re: Change Combbox Edit Box Backcolor
Code:
Changing the backcolor will change the backcolor of the entire control.
Yes umm, maybe my idea was not a good one, I am guessing I will need to subclass the combobox edit box some how?
-
Apr 23rd, 2010, 02:12 PM
#7
Re: Change Combbox Edit Box Backcolor
Subclassing is the answer. An editable combobox consists of 3 controls: the outer control, an inner textbox, and a listbox for the dropdown. The textbox portion sends its parent (the combobox) a WM_CTLCOLOREDIT message each time it is about to be drawn. If responding to that event, supply a colored brush per documentation
-
Apr 23rd, 2010, 02:16 PM
#8
Thread Starter
Fanatic Member
Re: Change Combbox Edit Box Backcolor
Thanks LaVolpe, I thought it require some sort of subclass. I have a look into subclassing it.
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
|