Re: ScrollWindowEx and drawing in C#
- From: "Willy Denoyette [MVP]" <willy.denoyette@xxxxxxxxxx>
- Date: Sat, 28 Jan 2006 16:27:39 +0100
Yes I do, Rectangle in System.Drawing != Rectangle in User32.
So you need to declare a structure like this:
struct Rect{
public int left;
public int top;
public int right;
public int bottom;
}
Willy.
"Ivonne Riedel" <ivonneundlars@xxxxxxxxxxx> wrote in message
news:drfsbr$ghq$00$1@xxxxxxxxxxxxxxxxxxxx
|I used the C# System.Drawing Rectangle.
| I did not make any modifications to it.
| Do you see this as the mistake?
|
| Thanks
|
| Ivonne.
|
| "Willy Denoyette [MVP]" <willy.denoyette@xxxxxxxxxx> schrieb im
Newsbeitrag
| news:eKrnbG$IGHA.1132@xxxxxxxxxxxxxxxxxxxxxxx
| > Check or post your declararation of Rectangle.
| >
| > Willy.
| >
| > "Ivonne Riedel" <ivonneundlars@xxxxxxxxxxx> wrote in message
| > news:dredvj$e70$01$1@xxxxxxxxxxxxxxxxxxxx
| > | Working on an incremental drawing algorithm I am facing a problem
| > PInvoking
| > | ScrollWindowEx:
| > | The code is as follows...
| > |
| > |
| > | C#:
| > | [DllImport("user32.dll")]
| > | public static extern int ScrollWindowEx(IntPtr hWnd, int
| > | dx, int dy, IntPtr scrollRect, IntPtr clipRect, IntPtr
| > | hrgn, ref Rectangle updateRect, uint flags);
| > |
| > | Rectangle update = new Rectangle();
| > |
| > | ScrollWindowEx(
| > | this.Handle,
| > | this.ClientRectangle.X - hScrollBar.Value,
| > | 0,
| > | IntPtr.Zero,
| > | IntPtr.Zero,
| > | IntPtr.Zero,
| > | ref update,
| > | 0);
| > |
| > | C++:
| > |
| > |
| >
child->ScrollWindowEx(child->fenster_pos.x-pos,0,NULL,NULL,NULL,&update,0);
| > |
| > | There is a difference in the values between calling ScrollWindowEx in
| > C++
| > | and through the PInvoke with C#.
| > | The arguments are identical but not the results (update.left,
scrolling
| > only
| > | horizontally).
| > | Can anybody identify the problem or my mistake?
| > | Thanks in advance.
| > |
| > | Ivonne.
| > |
| > |
| >
| >
|
|
.
- References:
- ScrollWindowEx and drawing in C#
- From: Ivonne Riedel
- Re: ScrollWindowEx and drawing in C#
- From: Willy Denoyette [MVP]
- Re: ScrollWindowEx and drawing in C#
- From: Ivonne Riedel
- ScrollWindowEx and drawing in C#
- Prev by Date: Properties.Settings; ArrayList and a custom object
- Next by Date: VS2005 Debugger Visualizer
- Previous by thread: Re: ScrollWindowEx and drawing in C#
- Next by thread: ~Simple number problem
- Index(es):
Relevant Pages
|