From: JJ on
Hi,

I'm trying to stick a small popup window position on top of another
larger popup window. Eventhough it works, the movement of the smaller
window is noticeably sluggish. Meaning that it's very easy to spot that
the smaller window position is following the larger window.

Is there any trick to make the position update faster?

Thanks in advance.

Regards,
JJ
From: Jackie on
JJ wrote:
> Hi,
>
> I'm trying to stick a small popup window position on top of another
> larger popup window. Eventhough it works, the movement of the smaller
> window is noticeably sluggish. Meaning that it's very easy to spot that
> the smaller window position is following the larger window.
>
> Is there any trick to make the position update faster?
>
> Thanks in advance.
>
> Regards,
> JJ

I have one idea but I am not sure how well it would work. My idea is
setting the position of the "following" window when the main window
receives the WM_WINDOWPOSCHANGING message. It's received before the UI
has been updated.

--
Regards,
Jackie
From: JJ on
Jackie wrote:
> I have one idea but I am not sure how well it would work. My idea is
> setting the position of the "following" window when the main window
> receives the WM_WINDOWPOSCHANGING message. It's received before the UI
> has been updated.

Thanks, but I could notice any speed difference when using
WM_WINDOWPOSCHANGING. Maybe the difference was so small to notice. My
code updates the follower window when WM_MOVING is received.

Nevertheless, I think using WM_WINDOWPOSCHANGING is better since the
kernel sends WM_WINDOWPOSCHANGING prior sending WM_MOVING, if I'm not
mistaken.

Thanks again.


Regards,
JJ
From: Leo Davidson on
On Aug 7, 3:13 pm, JJ <jaeju...(a)googlemail.com> wrote:

> I'm trying to stick a small popup window position on top of another
> larger popup window. Eventhough it works, the movement of the smaller
> window is noticeably sluggish. Meaning that it's very easy to spot that
> the smaller window position is following the larger window.

Are the two windows in the same process?

Are the two windows on the same thread?

How are you moving the second window? Via a direct call, a posted
message, a send message, or something else?

You should be able to do it with no visible lag at all, since I know a
program which does just that.
From: JJ on
Leo Davidson wrote:
> Are the two windows in the same process?
>
> Are the two windows on the same thread?
>
> How are you moving the second window? Via a direct call, a posted
> message, a send message, or something else?
>
> You should be able to do it with no visible lag at all, since I know a
> program which does just that.

Yes, both windows belong to the same process (my own Win32 application
process) and same thread.

I'm moving the sticky window when WM_WINDOWPOSCHANGING (originally was
WM_MOVING) message is received.

The sticky window must be a non-child window and it must "stick" to a
specific client position of the main window to make it looks like it's a
child window (i.e. no caption, no borders).

The looks and handling (i.e. minimize/maximize) are already complete.
I'm just experiencing performance problem.