Revision: 7331 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/7331 Author: zmatsuo Date: 2018-12-18 23:31:04 +0900 (Tue, 18 Dec 2018) Log Message: ----------- APIのプロトタイプが異なっていたので修正 Modified Paths: -------------- trunk/TTProxy/YCL/include/YCL/Window.h -------------- next part -------------- Modified: trunk/TTProxy/YCL/include/YCL/Window.h =================================================================== --- trunk/TTProxy/YCL/include/YCL/Window.h 2018-12-18 14:30:54 UTC (rev 7330) +++ trunk/TTProxy/YCL/include/YCL/Window.h 2018-12-18 14:31:04 UTC (rev 7331) @@ -204,15 +204,15 @@ bool GetScrollInfo(int type, SCROLLINFO& info)const { return ::GetScrollInfo(window, type, &info) != FALSE; } - long SetLayeredWindowAttributes(long reserved, int parameters, long attribute) { + long SetLayeredWindowAttributes(COLORREF crKey, BYTE bAlpha, DWORD dwFlags) { static const char USER32[] = "user32.dll"; static const char APINAME[] = "SetLayeredWindowAttributes"; - static DWORD (WINAPI* api)(HWND, DWORD, BYTE, DWORD) - = (DWORD (WINAPI*)(HWND, DWORD, BYTE, DWORD)) ::GetProcAddress(::GetModuleHandle(USER32), APINAME); - return api != NULL ? (*api)(window, reserved, parameters, attribute) : 0; + static BOOL (WINAPI* api)(HWND, COLORREF, BYTE, DWORD) + = (BOOL (WINAPI*)(HWND, COLORREF, BYTE, DWORD)) ::GetProcAddress(::GetModuleHandleA(USER32), APINAME); + return api != NULL ? (*api)(window, crKey, bAlpha, dwFlags) : 0; } - long SetLayeredWindowAttributes(int parameters, long attribute) { - return SetLayeredWindowAttributes(0, parameters, attribute); + long SetLayeredWindowAttributes(BYTE bAlpha, DWORD dwFlags) { + return SetLayeredWindowAttributes(0, bAlpha, dwFlags); } HWND SetClipboardViewer() { return ::SetClipboardViewer(window); @@ -311,7 +311,7 @@ #ifndef WS_EX_LAYERED #define WS_EX_LAYERED 0x80000 #endif - void setAlpha(int alpha) { + void setAlpha(BYTE alpha) { long exStyle = getExStyle(); if ((exStyle & WS_EX_LAYERED) == 0) setExStyle(exStyle | WS_EX_LAYERED);