2008年1月23日 星期三

win32 api backup

取得螢幕數量:
GetSystemMetrics(SM_CMONITORS)

取得多螢幕寬高:
GetSystemMetrics(SM_CXVIRTUALSCREEN);
GetSystemMetrics(SM_CYVIRTUALSCREEN);

將視窗移system tray:
Shell_NotifyIcon()

設定視窗透明度:
First -> Add WS_EX_LAYERED to Window Style ( SetWindowLong )
Then -> SetLayeredWindowAttributes( 0, alpha_value, LWA_ALPHA )

設定視窗為Desktop Tools:
add WS_EX_TOOLWINDOW to Window Style ( SetWindowLong )