Re: RECT - Rectangle



Nicholas,

Are you sure about this? It seems at first glance that the Rectangle class
uses left, top, *width*, *height* while RECT uses left, top, *right*,
*bottom*. Also, I think I remember seeing strange behavior when I tried
using the Rectangle class (changing to RECT fixed the problem.)

--
Colin Neller
http://www.colinneller.com/blog


"Nicholas Paldino [.NET/C# MVP]" <mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:%2367yqcWEGHA.1584@xxxxxxxxxxxxxxxxxxxxxxx
> Mythran,
>
> Yes, you can use the System.Drawing.Rectangle structure in place of the
> RECT structure in interop calls. The structure layout is the same.
>
> Hope this helps.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> "Mythran" <kip_potter@xxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:uJ$1SIWEGHA.3820@xxxxxxxxxxxxxxxxxxxxxxx
>>I have a question regarding the RECT structure required for PInvoke calls.
>>I was reviewing the Rectangle structure (System.Drawing.Rectangle) and it
>>occurred to me that I may be able to use this structure in place of
>>defining a RECT structure. I would create the RECT structure definition
>>the same as the Rectangle structure is defined. Is there any problems
>>with using Rectangle in place of RECT for the API functions?
>>
>> Thanks,
>> Mythran
>>
>
>


.



Relevant Pages

  • Re: InvalidateRect Pinvoke and C#
    ... My intention is to refresh ... But this doesn't work - the rectangle I enter isn't be invalidated ... > using a RECT structure passed to InvalidateRect. ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: TrackPopupMenu
    ... > Points to a RECT structure or CRect object that contains the screen ... >coordinates of a rectangle within which the user can click without ... MVP VC++ FAQ: http://www.mvps.org/vcfaq ...
    (microsoft.public.win32.programmer.ui)
  • Re: RECT - Rectangle
    ... RECT structure does. ... It seems at first glance that the Rectangle ... >>>of defining a RECT structure. ... >>> Mythran ...
    (microsoft.public.dotnet.languages.csharp)
  • Why one of the reasons to say that a design is bad is about deployment???
    ... The Rectangle class has two methods shown. ... It never draws the rectangle on the ... some computational geometry, but it definitely draws the rectangle on ...
    (comp.lang.java.programmer)
  • Re: method to access the name of the object that got created.
    ... If R1 is a object of Rectangle class with width 20, on calling ... "R1Is having a width of 20" ...
    (comp.lang.java.programmer)