Re: Bug with MoveWindow for a ComboBox using MFC??
Hi Shail,
I don't have any more to offer. If I were you I would save the current
setting right before moving it and then restore that setting after moving
it. That's a work around, not a solution, but then you could get on with
other things. I seldom move controls dynamically, but I do use the
Resizeable library which does that for me and I've never had any problems
(that I know of). I took a quick look through that code and I don't see
anything special for combo boxes.
Another thing you could do is derive your own movable combo box from
CComboBox and just ignore that message the first time after moving, but that
seems more risky than just restoring the value to what you think it should
be after a move which is pretty straight forward.
Sorry I don't have more to offer. Perhaps someone else with a similar
experience will chime in.
Tom
<skaveti@gmail.com> wrote in message
news:1153761906.308003.60560@p79g2000cwp.googlegroups.com...
Hey Tom,
Thank u so much for all the help. So when I run Spy and see what kind
of windows messages are generated, i see WM_GETTEXT and
WM_SETTEXT,EM_SETSEL right after the combo box's position is changed. I
don't understand how this is happening. WM_SETTEXT is setting it to a
different value. This is probably happening because the item WM_GETTEXT
returns doesn't exist in the dropdown list anymore. But it is so
strange that it looks for a prefix match. Any more insights Tom? Thanks
again for all the help.
Thanks,