|
HRGN WindowRgn, HoleRgn ;
WindowRgn = 0;
GetWindowRgn(this, WindowRgn);
DeleteObject(WindowRgn);
WindowRgn = CreateRectRgn(0,0,Width, Height);
HoleRgn = CreateRectRgn(0, 0, Width, top);
CombineRgn(WindowRgn, WindowRgn, HoleRgn, RGN_DIFF);
HoleRgn = CreateRectRgn(0, 0, left, Height);
CombineRgn(WindowRgn, WindowRgn, HoleRgn, RGN_DIFF);
HoleRgn = CreateRectRgn(width + left, 0, Width, Height);
CombineRgn(WindowRgn, WindowRgn, HoleRgn, RGN_DIFF);
HoleRgn = CreateRectRgn(0, height + top, Width, Height);
CombineRgn(WindowRgn, WindowRgn, HoleRgn, RGN_DIFF);
SetWindowRgn(this->Handle, WindowRgn, TRUE);
DeleteObject(HoleRgn);
질문 올리고 나니깐 검색결과가 바로 보이더군요;;
안보여야 되는 부분 다 잘라냈습니다;
박진수 님이 쓰신 글 :
: __fastcall TForm1::TForm1(TComponent* Owner)
: : TForm(Owner)
: {
: Color = 0x000001;
: TransparentColor = true;
: TransparentColorValue = 0x000001;
: }
:
:
: 이런 코드로 폼 내부를 투명하게 만들었습니다.
:
: 그런데 xp에서는 투명한 폼은 포커스를 가지지 못해서 투명한 폼 내부를 클릭하면 뒤의 프로그램이 선택되었지만,
:
: 비스타 이상에서는 포커스를 가져서 뒤의 프로그램이 선택이 안되네요...
:
: 비스타 이상에서도 똑같이 투명 폼 뒤의 프로그램을 제어 할 수 있는 방법이 없을까요?
:
: 첨부파일은 저 코드만 넣어놓은 프로그램입니다...
:
:
: 추가) 실제로 저 폼 위에는 패널등 여러가지가 올라가서 알파블렌드는 사용 할 수 없습니다 ㅠㅠ
|