윈도의의 모서리 이미지 깍을때 사용하는 함수
from MSDN
Using Layered Windows
To have a dialog box come up as a translucent window, first create the dialog as usual. Then, on WM_INITDIALOG, set the layered bit of the window's extended style and call SetLayeredWindowAttributes with the desired alpha value. The code might look like this:
// Set WS_EX_LAYERED on this window SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED); // Make this window 70% alpha SetLayeredWindowAttributes(hwnd, 0, (255 * 70) / 100, LWA_ALPHA);
Note that the third parameter of SetLayeredWindowAttributes is a value that ranges from 0 to 255, with 0 making the window completely transparent and 255 making it completely opaque. This parameter mimics the more versatile BLENDFUNCTION of the AlphaBlend function.
To make this window completely opaque again, remove the WS_EX_LAYERED bit by calling SetWindowLong and then ask the window to repaint. Removing the bit is desired to let the system know that it can free up some memory associated with layering and redirection. The code might look like this:
// Remove WS_EX_LAYERED from this window styles SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) & ~WS_EX_LAYERED); // Ask the window and its children to repaint RedrawWindow(hwnd, NULL, NULL, RDW_ERASE | RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN);
In order to use layered child windows, the application has to declare itself Windows 8-aware in the manifest.
'기본정보' 카테고리의 다른 글
모바일 광고 테스트 (0) | 2013.08.02 |
---|---|
Intel SSD 520 Series 체험리뷰 (0) | 2012.02.21 |
----Intel SSD 520---- (0) | 2012.02.13 |
[루팅]옵티머스 3D 진저브레드 2.3.5 루팅 (Optimus 3D Gingerbread 2.3.5) (0) | 2011.12.09 |