|
HRGN WindowRgn, HoleRgn ;
WindowRgn = 0;
GetWindowRgn(Handle, WindowRgn);
DeleteObject(WindowRgn);
WindowRgn = CreateRectRgn(0,0,Width, Height);
HoleRgn = CreateRectRgn(20,50,Width-20,Height-70);
CombineRgn(WindowRgn, WindowRgn, HoleRgn, RGN_DIFF);
SetWindowRgn(Handle, WindowRgn, TRUE);
DeleteObject(HoleRgn);
// DeleteObject(WindowRgn); ?
1. HRGN은 어떤것인가요. msdn에서 가서 찾아 봣더니
CRgn::operator HRGN
use this operatro to get the attached windows GDI handle of the CRgn object.
this operator is a casting operator,which supports direct use of a HRGN object.
선언자같은데 아닌가여 HRGN은 어떤 정보를 갖는지?
2. CombineRgn이 창의 틀을만드는 즉, 투명부분을 만드는 것인듯하거든요. 근데 화면에
표시되는 것은 SetWindowRgn 때문인가여? CombineRgn 만으로는 창의 정보만 만드는것인지?
3. SetWindowRgn 에 이런 말이 있는데
In particular, do not delete this region handle. The System deletes the region handle when
it no longer needed.
자동 삭제라는 말은 알겟는데 창에 구멍을 내놓고 창의 크기를 변경시키면 구멍이 사라지거든요
그래서 resize event 에도 넣어 낳는데 그럼 object가 마구 생성되는게 아닌지... 그래서
delete 해줘야 하는건아닌지....
둘다 해봣는데 별 이상한 차이점을 못느끼겟어여
허접한 질문 읽어 주셔서 감사^^ 좋은 하루되세요
|