(LayeredWindowHelperST.cpp/h files)
but this is the only place eMule uses this class,
so i moved the code to the MiniMule.cpp file:
Quote
...
if (m_uWndTransparency)
{
// Avi3k: improve code
::SetWindowLong(m_hWnd, GWL_EXSTYLE, ::GetWindowLong(m_hWnd, GWL_EXSTYLE) | WS_EX_LAYERED);
BOOL (WINAPI* pfnSetLayeredWndAttribs)(HWND hWnd, COLORREF crKey, BYTE bAlpha, DWORD dwFlags);
(FARPROC&)pfnSetLayeredWndAttribs = GetProcAddress(GetModuleHandle(_T("user32")), "SetLayeredWindowAttributes");
if (pfnSetLayeredWndAttribs)
(*pfnSetLayeredWndAttribs)(m_hWnd, 0, 255 * m_uWndTransparency/100, LWA_ALPHA);
// end Avi3k: improve code
}
...
if (m_uWndTransparency)
{
// Avi3k: improve code
::SetWindowLong(m_hWnd, GWL_EXSTYLE, ::GetWindowLong(m_hWnd, GWL_EXSTYLE) | WS_EX_LAYERED);
BOOL (WINAPI* pfnSetLayeredWndAttribs)(HWND hWnd, COLORREF crKey, BYTE bAlpha, DWORD dwFlags);
(FARPROC&)pfnSetLayeredWndAttribs = GetProcAddress(GetModuleHandle(_T("user32")), "SetLayeredWindowAttributes");
if (pfnSetLayeredWndAttribs)
(*pfnSetLayeredWndAttribs)(m_hWnd, 0, 255 * m_uWndTransparency/100, LWA_ALPHA);
// end Avi3k: improve code
}
...
lines to remove from MiniMule.h:
#include "LayeredWindowHelperST.h" ... CLayeredWindowHelperST m_layeredWnd;
this code uses the original code of LayeredWindowHelperST.cpp
but i removed all redundent parts...
i also checked the code and it works great
btw, now it is safe to remove the files i mentioned here (under OT)
Avi3k