Official eMule-Board: Minimule Transparent Code Improvement - Official eMule-Board

Jump to content


Page 1 of 1

Minimule Transparent Code Improvement

#1 User is offline   Avi-3k 

  • hebMule [retired] dev
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,127
  • Joined: 25-June 03

Posted 10 September 2005 - 11:51 AM

currently the MiniMule code uses a helping class
(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

  }
...

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) :+1:

Avi3k
retired developer of hebMule and eMule Skinner...
hebMule site and topic.
hebMule2 unique features: AntiLeech, AntiVirus, Fake Check, ServerFilter, WebSearches, Export Searches, Relative Priority, ModID and much much more...

eMule Skinner is an application to create/edit skins for eMule,
it's multilingual, supports mods, easy-to-use design, integrates to hebMule & Windows and lots more...

code fixes/improvements: #1, #2, #3, #4, #5, #6, #7, #8, #9, #10, #11 (to check/verify: #12, #13).
0

  • Member Options

Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users