J
Jeff Johnson
I'm creating an owner-drawn control (inherited from Control) which is
scrollable, and I'm using standard scroll bars for that aspect (i.e., my
control is owner drawn except for the scroll bars, and yes, I know, I could
have used ScrollableControl). I want to implement "thumbnail panning"
functionality, by which I mean the user can click in the little square
formed where the two scrollbars meet and a thumbnail window pops up
representing the entire control, and the user can move the mouse around in
this thumbnail to select the portion of the surface that is to be displayed
in the main viewport. (What a mouthful.) This functionality can be found in
the SSIS designer, the Windows Workflow designer, and probably lots of other
programs that have drawing surfaces which are often larger than what is
visible.
The design issue I'm bringing up is the transfer of mouse capture from one
window to another. If it weren't for the scroll bars I'd simply draw my pan
window and worry about mouse movement in my main control. However, since the
scroll bars are child controls they're higher in the z-order and I won't be
able to draw over them. Therefore I'm assuming I need to popup up a
separate, borderless form to serve as the thumbnail. Not a problem, but I
want this form to immediately take over the mouse. In other words, once the
mouse goes down on the main control it needs to stay down; releasing the
mouse button is the signal that the user has selected the desired viewport
and it's time to dismiss the pan window. Since my main control will have
mouse capture, how do I send it to the pan window?
scrollable, and I'm using standard scroll bars for that aspect (i.e., my
control is owner drawn except for the scroll bars, and yes, I know, I could
have used ScrollableControl). I want to implement "thumbnail panning"
functionality, by which I mean the user can click in the little square
formed where the two scrollbars meet and a thumbnail window pops up
representing the entire control, and the user can move the mouse around in
this thumbnail to select the portion of the surface that is to be displayed
in the main viewport. (What a mouthful.) This functionality can be found in
the SSIS designer, the Windows Workflow designer, and probably lots of other
programs that have drawing surfaces which are often larger than what is
visible.
The design issue I'm bringing up is the transfer of mouse capture from one
window to another. If it weren't for the scroll bars I'd simply draw my pan
window and worry about mouse movement in my main control. However, since the
scroll bars are child controls they're higher in the z-order and I won't be
able to draw over them. Therefore I'm assuming I need to popup up a
separate, borderless form to serve as the thumbnail. Not a problem, but I
want this form to immediately take over the mouse. In other words, once the
mouse goes down on the main control it needs to stay down; releasing the
mouse button is the signal that the user has selected the desired viewport
and it's time to dismiss the pan window. Since my main control will have
mouse capture, how do I send it to the pan window?