[vlc-devel] commit: skins2(Win32): no need to manage a two window classes (Erwan Tulou )
git version control
git at videolan.org
Mon Mar 1 22:00:42 CET 2010
vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Mon Mar 1 21:12:42 2010 +0100| [e86c4feff7651d53eb7bb3d28b3a724a52dd7055] | committer: Erwan Tulou
skins2(Win32): no need to manage a two window classes
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e86c4feff7651d53eb7bb3d28b3a724a52dd7055
---
modules/gui/skins2/win32/win32_factory.cpp | 30 +---------------------------
modules/gui/skins2/win32/win32_window.cpp | 2 +-
2 files changed, 2 insertions(+), 30 deletions(-)
diff --git a/modules/gui/skins2/win32/win32_factory.cpp b/modules/gui/skins2/win32/win32_factory.cpp
index 395ba6d..1f1ba22 100644
--- a/modules/gui/skins2/win32/win32_factory.cpp
+++ b/modules/gui/skins2/win32/win32_factory.cpp
@@ -125,7 +125,7 @@ bool Win32Factory::init()
// Create window class
WNDCLASS skinWindowClass;
- skinWindowClass.style = CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS;
+ skinWindowClass.style = CS_DBLCLKS;
skinWindowClass.lpfnWndProc = (WNDPROC) Win32Proc;
skinWindowClass.lpszClassName = _T("SkinWindowClass");
skinWindowClass.lpszMenuName = NULL;
@@ -150,34 +150,6 @@ bool Win32Factory::init()
}
}
-
- // Create window class for window of VoutWindow type
- WNDCLASS voutWindowClass;
- voutWindowClass.style = CS_OWNDC|CS_DBLCLKS;
- voutWindowClass.lpfnWndProc = (WNDPROC) Win32Proc;
- voutWindowClass.lpszClassName = _T("VoutWindowClass");
- voutWindowClass.lpszMenuName = NULL;
- voutWindowClass.cbClsExtra = 0;
- voutWindowClass.cbWndExtra = 0;
- voutWindowClass.hbrBackground = (HBRUSH__*) GetStockObject( BLACK_BRUSH);
- voutWindowClass.hCursor = LoadCursor( NULL , IDC_ARROW );
- voutWindowClass.hIcon = LoadIcon( m_hInst, _T("VLC_ICON") );
- voutWindowClass.hInstance = m_hInst;
-
- // Register class and check it
- if( !RegisterClass( &voutWindowClass ) )
- {
- WNDCLASS wndclass;
-
- // Check why it failed. If it's because the class already exists
- // then fine, otherwise return with an error.
- if( !GetClassInfo( m_hInst, _T("VoutWindowClass"), &wndclass ) )
- {
- msg_Err( getIntf(), "cannot register voutWindow window class" );
- return false;
- }
- }
-
// Create Window
m_hParentWindow = CreateWindowEx( WS_EX_TOOLWINDOW, _T("SkinWindowClass"),
_T("VLC media player"), WS_POPUP | WS_SYSMENU | WS_MINIMIZEBOX,
diff --git a/modules/gui/skins2/win32/win32_window.cpp b/modules/gui/skins2/win32/win32_window.cpp
index 18c8618..d71c74c 100644
--- a/modules/gui/skins2/win32/win32_window.cpp
+++ b/modules/gui/skins2/win32/win32_window.cpp
@@ -59,7 +59,7 @@ Win32Window::Win32Window( intf_thread_t *pIntf, GenericWindow &rWindow,
// Child window (for vout)
m_hWnd_parent = pParentWindow->getHandle();
m_hWnd = CreateWindowEx( WS_EX_TOOLWINDOW | WS_EX_NOPARENTNOTIFY,
- "VoutWindowClass", "default name",
+ "SkinWindowClass", "default name",
WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
0, 0, 0, 0, m_hWnd_parent, 0, hInst, NULL );
}
More information about the vlc-devel
mailing list