
Problem with Composite Control containing a Full Control
Hi,
I've developed an ATL Full Control that wraps a Standard
Windows Edit control and acts just like the VB TextBox
with the difference that it has some more features.
In the Edit control's WM_MOUSEACTIVATE handler, I'm in-
place-activating it.
So far, so good - the Full Control works perfectly on a
VB form and even as a child control in a self-developed
ATL Frame Control which uses SimpleFrame functionality
and that acts just like the VB Frame Control.
With "functions perfectly" I mean: it gets the focus
correctly und it can handle its accelerators in
TranslateAccelerator (e. g. Cursor keys) method.
But, here's the problem:
If I add this Edit Full Control to an ATL Composite
control, compile it and place this composite control an a
VB form, there's some strange stuff going on, meaning:
- When I click into the Edit control, it gets focus only
after some short lack of time (this is the first strange
issue).
- I then type some text and activate another control on
the VB parent form, so my control loses focus. In this
moment, the other control gets focus as expected, but my
control still seems to have the caret (not blinking, just
a static black line - painting bug?!).
- If I then give focus back to my control by clicking,
the text in the control simply disappears, meaning the
text is still there, but not painted.
If I give focus to my control by the Tab key, everything
works fine.
Did anybody already have that problem?
Any help is appreciated!
I spent hours on searching for samples, but I didn't find
anything that reflects the situation I have.
Oh, I'm using Visual C++ 6.0 and ATL 3.0
Thx
PhreekySicko