This small additions to WDL-OL enables transparent plug-in window (like Blue Cats).
Reference
IGraphicsWin.cpp:
Code:
void IGraphicsWin::SetWindowTransparency(int alpha)
{
if(mParentWnd)
{
SetWindowLong(mParentWnd, GWL_EXSTYLE, GetWindowLong(mParentWnd, GWL_EXSTYLE) | WS_EX_LAYERED);
SetLayeredWindowAttributes(mParentWnd, 0, (BYTE)alpha, LWA_ALPHA);
}
}
IGraphicsMac.mm:
Code:
void IGraphicsMac::SetWindowTransparency(int alpha)
{
#ifndef IPLUG_NO_CARBON_SUPPORT
if (mGraphicsCarbon)
{
}
else
#endif
if (mGraphicsCocoa)
{
[(IGRAPHICS_COCOA*) mGraphicsCocoa SetWindowTransparency:alpha];
}
}
IGraphicsCocoa.mm:
Code:
- (void) SetWindowTransparency: (int) _mAlpha
{
NSWindow* pWindow = [self window];
CGFloat opacity = _mAlpha / 255.0f;
[pWindow setAlphaValue:opacity];
[pWindow setOpaque:NO];
}