Subject: Re: Windowz
>>And you might have to do a Call to DeleteObject(Rgn2); To get rid
of memory
leaks.
That's usually the story. Any API call that starts with Create usually
allocates memory for what is created, and will require a call to either
a corresponding Delete or Destroy call, or DeleteObject to free the
memory...
eg CreateWindow, DestroyWindow
>----------
>Subject: SV:
Windowz
>
>When I did this. I discoverd that the destination object must exist.
Like
>this:
>Rgn1 := CreateRoundRectRgn(0,0,Width,Height,10,10);
>Rgn2 := CreateRoundRectRgn(Width-50,Height-50,Width-5,Height-5,10,10);
>CombineRgn(Rgn1,Rgn1,Rgn2,RGN_DIFF);
>
>And you might have to do a Call to DeleteObject(Rgn2); To get rid
of memory
>leaks. This is from a example i Win32.hlp.
>
>-----Ursprungligt meddelande-----
>>Can someone tell me, how use ExCreateRgn and CombineRgn?
>>I write somethink like this:
>>
>> Rgn1 := CreateRoundRectRgn(0,0,Width,Height,10,10);
>> Rgn2 := CreateRoundRectRgn(Width-50,Height-50,Width-5,Height-5,10,10);
>> CombineRgn(DestRgn,Rgn1,Rgn2,RGN_DIFF)
>>and result is
>> ERROR !!!