By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,285 Members | 1,647 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,285 IT Pros & Developers. It's quick & easy.

Dragging and Scrolling

P: n/a
I have a form that has controls on it that can be dragged to other
locations within the form. The form size is larger than the viewable
area so the scroll bars are visible (and autoscroll is enabled). When
I drag a control to the edge of the visible border, I am sending the
WM_HSCROLL/WM_VSCROLL message to the parent form to initiate a scroll.
This works good, the parent form scrolls and keeps scrolling until the
control is dropped or moved away from the edge of the visible form, but
my problem is that the control that is being dragged needs to appear as
though it is in the same place after the scroll. Moving the control
before or after sending the scroll message gives the appearance of the
dragging control "tearing" or flickering. It needs to appear as though
it isnt moving at all.

If I lockwindowsupdate during the scroll, the dragging control appears
to stay in one place, but the other controls on the form flicker when a
scroll is initiated.

Is there a way to lock a portion of a window? I have done some
research, but havent come up with anything. Does anyone have any
ideas?

TIA.

Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Jonathan,

Probably will it change your approach, have a look at panels, docking and
maybe even splitter.

I hope this helps,

Cor
Nov 21 '05 #2

P: n/a
I understand you recommendation, but this just seems like something
that should be doable. One option could be to hide the control that is
being dragged when a scroll in initiated and just change the cursor to
an arrow in the direction of the scroll. While that could be done, it
just isnt something I am ready to do just yet. Anyone else have any
ideas? I know that Microsoft folks hang out in the newsgroups, do you
have any insight?

Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.