Parent window created outside the screen so it isn't visible.
Could somebody (AsMaX, ipkiss) have a look at the AlphaBlend() function call in win32_graphics.cpp ? I'd like to use the AlphaBlend() we got from win32_factory.cpp.
* win32_factory.cpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: win32_factory.cpp,v 1.1 2004/01/03 23:31:34 asmax Exp $
+ * $Id: win32_factory.cpp,v 1.2 2004/01/27 17:01:51 gbazin Exp $
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulière <ipkiss@via.ecp.fr>
Win32Factory::Win32Factory( intf_thread_t *pIntf ):
- OSFactory( pIntf ), TransparentBlt( NULL ),
+ OSFactory( pIntf ), TransparentBlt( NULL ), AlphaBlend( NULL ),
SetLayeredWindowAttributes( NULL )
{
// see init()
// Create Window
m_hParentWindow = CreateWindowEx( WS_EX_APPWINDOW, "SkinWindowClass",
- "VLC Media Player", WS_SYSMENU, 0, 0, 0, 0, 0, 0,
- m_hInst, NULL );
+ "VLC media player", WS_SYSMENU, -200, -200, 0, 0, 0, 0, m_hInst, 0 );
if( m_hParentWindow == NULL )
{
msg_Err( getIntf(), "Cannot create parent window" );
msg_Dbg( getIntf(), "Couldn't find TransparentBlt(), "
"falling back to BitBlt()" );
}
+ if( !m_hMsimg32 ||
+ !( AlphaBlend =
+ (BOOL (WINAPI*)( HDC, int, int, int, int, HDC, int, int,
+ int, int, BLENDFUNCTION ))
+ GetProcAddress( m_hMsimg32, "AlphaBlend" ) ) )
+ {
+ AlphaBlend = NULL;
+ msg_Dbg( getIntf(), "Couldn't find AlphaBlend()" );
+ }
// Idem for user32.dll and SetLayeredWindowAttributes()
m_hUser32 = LoadLibrary( "user32.dll" );
* win32_factory.hpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: win32_factory.hpp,v 1.1 2004/01/03 23:31:34 asmax Exp $
+ * $Id: win32_factory.hpp,v 1.2 2004/01/27 17:01:51 gbazin Exp $
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulière <ipkiss@via.ecp.fr>
/// Functions dynamically loaded from the dll, because they don't exist
- /// on win9x
+ /// on Win9x/NT4
// We dynamically load msimg32.dll to get a pointer to TransparentBlt()
BOOL (WINAPI *TransparentBlt)( HDC, int, int, int, int,
HDC, int, int, int, int, UINT );
+ BOOL (WINAPI *AlphaBlend)( HDC, int, int, int, int, HDC, int, int,
+ int, int, BLENDFUNCTION );
+
// Idem for user32.dll and SetLayeredWindowAttributes()
BOOL (WINAPI *SetLayeredWindowAttributes)( HWND, COLORREF,
BYTE, DWORD );
* win32_graphics.cpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: win32_graphics.cpp,v 1.1 2004/01/03 23:31:34 asmax Exp $
+ * $Id: win32_graphics.cpp,v 1.2 2004/01/27 17:01:51 gbazin Exp $
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulière <ipkiss@via.ecp.fr>
bf.AlphaFormat = AC_SRC_ALPHA;
// Blend the image onto the internal DC
- if( !AlphaBlend( m_hDC, xDest, yDest, width, height, hDC, 0, 0,
+ if( 1/*AlphaBlend*/ &&
+ !AlphaBlend( m_hDC, xDest, yDest, width, height, hDC, 0, 0,
width, height, bf ) )
{
msg_Err( getIntf(), "AlphaBlend() failed" );
}
-
- // Copy the image onto the internal DC
- // BitBlt( m_hDC, xDest, yDest, width, height, hDC, 0, 0, SRCCOPY );
+ else if( 1/*!AlphaBlend*/ )
+ {
+ // Copy the image onto the internal DC
+ BitBlt( m_hDC, xDest, yDest, width, height, hDC, 0, 0, SRCCOPY );
+ }
// Add the bitmap mask to the global graphics mask
CombineRgn( m_mask, m_mask, mask, RGN_OR );