APIのプロトタイプが異なっていたので修正
@@ -204,15 +204,15 @@ | ||
204 | 204 | bool GetScrollInfo(int type, SCROLLINFO& info)const { |
205 | 205 | return ::GetScrollInfo(window, type, &info) != FALSE; |
206 | 206 | } |
207 | - long SetLayeredWindowAttributes(long reserved, int parameters, long attribute) { | |
207 | + long SetLayeredWindowAttributes(COLORREF crKey, BYTE bAlpha, DWORD dwFlags) { | |
208 | 208 | static const char USER32[] = "user32.dll"; |
209 | 209 | static const char APINAME[] = "SetLayeredWindowAttributes"; |
210 | - static DWORD (WINAPI* api)(HWND, DWORD, BYTE, DWORD) | |
211 | - = (DWORD (WINAPI*)(HWND, DWORD, BYTE, DWORD)) ::GetProcAddress(::GetModuleHandle(USER32), APINAME); | |
212 | - return api != NULL ? (*api)(window, reserved, parameters, attribute) : 0; | |
210 | + static BOOL (WINAPI* api)(HWND, COLORREF, BYTE, DWORD) | |
211 | + = (BOOL (WINAPI*)(HWND, COLORREF, BYTE, DWORD)) ::GetProcAddress(::GetModuleHandleA(USER32), APINAME); | |
212 | + return api != NULL ? (*api)(window, crKey, bAlpha, dwFlags) : 0; | |
213 | 213 | } |
214 | - long SetLayeredWindowAttributes(int parameters, long attribute) { | |
215 | - return SetLayeredWindowAttributes(0, parameters, attribute); | |
214 | + long SetLayeredWindowAttributes(BYTE bAlpha, DWORD dwFlags) { | |
215 | + return SetLayeredWindowAttributes(0, bAlpha, dwFlags); | |
216 | 216 | } |
217 | 217 | HWND SetClipboardViewer() { |
218 | 218 | return ::SetClipboardViewer(window); |
@@ -311,7 +311,7 @@ | ||
311 | 311 | #ifndef WS_EX_LAYERED |
312 | 312 | #define WS_EX_LAYERED 0x80000 |
313 | 313 | #endif |
314 | - void setAlpha(int alpha) { | |
314 | + void setAlpha(BYTE alpha) { | |
315 | 315 | long exStyle = getExStyle(); |
316 | 316 | if ((exStyle & WS_EX_LAYERED) == 0) |
317 | 317 | setExStyle(exStyle | WS_EX_LAYERED); |