|
-
Jun 5th, 2020, 07:26 PM
#6
Re: Custom ComboBox with editable text possible?
 Originally Posted by Wardo
I found that WM_CTLCOLOREDIT could help me, from the docs:
How can i accomplish this? I'm searching to do it from the WndProc of my ComboBox, but don't know how to:
Just for the sake of of showing code, this is what i've tried in the last couple of minutes since i asked.
Code:
<DllImport("gdi32.dll")>
Public Shared Function CreateSolidBrush(ByVal color As Integer) As IntPtr
End Function
Protected Overrides Sub WndProc(ByRef m As Message)
If (m.Msg = &H133) Then
Dim brush As IntPtr = CreateSolidBrush(RGB(255, 0, 0))
m.Result = brush
End If
MyBase.WndProc(m)
End Sub
Any advice?
Looking at what you've posted, you're calling CreateSolidBrush and returning a pointer to a brush. The docs text you quoted says it can be used to change the edit control (part of the Combo) colors and text. I think it wouldn't be possible to achieve what you're hoping for in that way. You're looking for a usable edit control, and what you've posted isn't that.
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
Tags for this Thread
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
|