[[ blog 이사 과정에서 정확한 posting날짜가 분실됨. 년도와 분기 정도는 맞지 않을까? ]]

* Making Blended & Clink-Through window

We can use following window style option at CreateWindowEx().
WS_EX_TRANSPARENT -> click-though
WS_EX_LAYERED -> alpha-blended window.

We can changne configuration in runtime by using following API.

SetLayeredWindowAttributes(...)
: Layered window's attributes (Alpha value, Transparet color etc) can be changed.

SetWindowLong(...)
: Window의 Ex Style can be changed. We can set or clear "Click-Through" by setting or clearing WS_EX_TRANSPARENT attributes.

* We can remove menu

by set 'lpszMenuName' as 'NULL' at 'WNDCLASSEX' structure when 'CreateWindowEx' is called.

* We can change initial background color of Window

by creating brush of preferred color at 'hbrBackground'.

* We can remove 'titlebar' and 'boarder'

by set 'dwStype' parameter as 'WS_POPUP' style.

* (Issue) Maximized window covers Taskbar!

We can resolve this issue by using 'WM_GETMINMAXINFO' and 'SystemParametersInfo/SPI_GETWORKAREA'.
('WM_GETMINMAXINFO' is sent when Window is moved or Window's size is changed.)

Let's put following code in the handler of 'WM_GETMINMAXINFO'.

MINMAXINFO* pi = (MINMAXINFO*)lParam;
RECT        r;
SystemParametersInfo(SPI_GETWORKAREA, 0, &r,0);
memset(pi, 0x00, sizeof(MINMAXINFO));
pi->ptMaxSize.x = r.right - r.left;
pi->ptMaxSize.y = r.bottom - r.top;
pi->ptMaxPosition.x = r.left;
pi->ptMaxPosition.y = r.top;

+ Recent posts