From 3209a5fc38088077300a7048a8ad3679ca3d41b8 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> Date: Tue, 6 Mar 2012 10:15:46 +0000 Subject: Latest updates git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@598 4f64403b-2f21-0410-a795-97e2b3489a10 --- yapp/popwin.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'yapp/popwin.cpp') diff --git a/yapp/popwin.cpp b/yapp/popwin.cpp index cceee79..64ed48c 100644 --- a/yapp/popwin.cpp +++ b/yapp/popwin.cpp @@ -633,9 +633,9 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa if(ace && (ace->dwFlags & AVS_BITMAP_VALID) && !(ace->dwFlags & AVS_HIDEONCLIST)) { if(ace->bmHeight >= ace->bmWidth) { pwd->real_av_height = options.av_size; - pwd->real_av_width = (int)(options.av_size * (ace->bmWidth / (double)ace->bmHeight)); + pwd->real_av_width = options.av_size * ace->bmWidth / ace->bmHeight; } else { - pwd->real_av_height = (int)(options.av_size * (ace->bmHeight / (double)ace->bmWidth)); + pwd->real_av_height = options.av_size * ace->bmHeight / ace->bmWidth; pwd->real_av_width = options.av_size; } pwd->have_av = true; @@ -762,7 +762,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa } void InitWindowStack() { - hUserDll = LoadLibrary(_T("user32.dll")); + hUserDll = GetModuleHandle(_T("user32.dll")); if (hUserDll) { MySetLayeredWindowAttributes = (BOOL (WINAPI *)(HWND,COLORREF,BYTE,DWORD))GetProcAddress(hUserDll, "SetLayeredWindowAttributes"); MyAnimateWindow=(BOOL (WINAPI*)(HWND,DWORD,DWORD))GetProcAddress(hUserDll,"AnimateWindow"); @@ -777,6 +777,5 @@ void InitWindowStack() { void DeinitWindowStack() { ClearStack(); - if(hUserDll) FreeLibrary(hUserDll); } -- cgit v1.2.3