tags:

views:

23

answers:

1

Hi..

I want two independent windows to be scroll synchronously using WIN32 C++. Right now whichever window in focused, scroll is working for only that window. But my requirement is like, with a single scroll both the windows should scroll..some one suggested me to send same scroll message for other window also...but MSDN says WM_HSCROLL message executes only for the active window.....Please suggest some resolution for this.... below is the message sent for scrolling

FORWARD_WM_MOUSEWHEEL((HWND) *EegOut, x, y, zDelta, fwKeys, SendMessage);

sfter this sendmessage sends WM_HSCROLL message..

please he

A: 

Assume you have Window1 and Window2 with mouse wheel handling procedures handleWheelEvent1 and handleWheelEvent2.

Let's assume the scroll event is received by Window1. After the call to handleWheelEvent1 in the Window1, you make your program call handleWheelEvent2 procedure. You don't have to do the sending of the mouse wheel event.

I don't know how your code is structured but in my opinion this is the best choice.

In the reversed/mirror case is the same logic.

Iulian Şerbănoiu