Re: RECT - Rectangle
- From: "Nicholas Paldino [.NET/C# MVP]" <mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 4 Jan 2006 15:10:00 -0500
Colin,
Yes, I am. The fields internally are laid out in the same way that the
RECT structure does. The property that you see, Right, is returned on the
fly, and there is not a backing store for it in the class.
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx
"Colin Neller" <cneller@xxxxxxxxx> wrote in message
news:OxLjWpWEGHA.2388@xxxxxxxxxxxxxxxxxxxxxxx
> 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
>>>
>>
>>
>
>
.
- Follow-Ups:
- Re: RECT - Rectangle
- From: Mattias Sjögren
- Re: RECT - Rectangle
- References:
- RECT - Rectangle
- From: Mythran
- Re: RECT - Rectangle
- From: Nicholas Paldino [.NET/C# MVP]
- Re: RECT - Rectangle
- From: Colin Neller
- RECT - Rectangle
- Prev by Date: Encryption Question
- Next by Date: Re: Invisible Event
- Previous by thread: Re: RECT - Rectangle
- Next by thread: Re: RECT - Rectangle
- Index(es):
Relevant Pages
|
Loading