diff options
author | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2012-03-06 10:15:46 +0000 |
---|---|---|
committer | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2012-03-06 10:15:46 +0000 |
commit | 3209a5fc38088077300a7048a8ad3679ca3d41b8 (patch) | |
tree | b80baa59ec06f35e932920fa5284c04cc37ab330 /yapp/popwin.cpp | |
parent | fa3cdddd7fa6c0b50b117709da605a524e36117a (diff) |
Latest updates
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@598 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'yapp/popwin.cpp')
-rw-r--r-- | yapp/popwin.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
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);
}
|