ScrollWindowEx

T

Tony Liu

Hi, I am having problem to scroll only a partion of a window using the
ScrollWindowEx api function. The code is below and any help is pleased.
Thanks in advance.


[DllImport("user32.dll")]
private extern int ScrollWindowEx (IntPtr handle, int dx, int dy, Rectangle
lprcScroll , Rectangle lprcClip, IntPtr hrgnUpdate, out Rectangle
lprcUpdate, int fuScroll);



Rectangle rt;
// This works
ScrollWindowEx(Handle, 0, 30, Rectangle.Empty, Rectangle.Empty, IntPtr.Zero,
out rt, 0);

// This doesn't work
ScrollWindowEx(Handle, 0, 30, new Rectangle(20, 20, ClientSize.Width,
ClientSize.Height), Rectangle.Empty, IntPtr.Zero, out rt, 0);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top