I am using a standard TCombobox on a form. I am owner-drawing the list, and
would like to have some flashing colors in the list. I have a timer-like
thread that calls a procedure that I will use to do the update, but what do
I use to update the list when it is already visible? Is this even possible?
I have tried posting paint messages to the handle of the drop-down list, but
so far nothing works.
Thanks,
Richard
> Hi,
>
> I am using a standard TCombobox on a form. I am owner-drawing the list, and
> would like to have some flashing colors in the list.
Ugh! %-).
> I have a timer-like
> thread that calls a procedure that I will use to do the update, but what do
> I use to update the list when it is already visible? Is this even possible?
>
> I have tried posting paint messages to the handle of the drop-down list, but
> so far nothing works.
I think you may need to 'Invalidate' the component first, or Windows will
think that no painting is needed.
Does your painting procedure fire when another window/app has covered the
box and then revealed it again?
>Ugh! %-).
<g> Hey, it could be worse.
>I think you may need to 'Invalidate' the component first, or Windows will
>think that no painting is needed.
The list isn't part of the component's window however, so that won't
be adequate. He needs to (at least) invalidate that ComboLBox class
window which is a child of the desktop.
Kurt
If you have managed to find the handle of the drop down list (not the
combo box itself - that's a different window) you should be able to
invalidate it. Use:
InvalidateRect(Handle, nil, False);
Good luck.
Kurt
Anything is possible if you throw enough money at it <G>.
>
> I have tried posting paint messages to the handle of the drop-down list, but
> so far nothing works.
InvalidateRect( dropdownlisthandle, areaofitemtorepaint );
UpdateWindow( dropdownlisthandle );
--
Peter Below (TeamB)
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be