]> git.sesse.net Git - vlc/blobdiff - modules/gui/wxwindows/wxwindows.cpp
* include/configuration.h: added a new flag to the configuration stucture to
[vlc] / modules / gui / wxwindows / wxwindows.cpp
index 950d8e9297e01dc146433b24da0362f891b5afca..0ec003ff3cd9c0c9fa2296b5eb53b421f81bcf5b 100644 (file)
@@ -2,7 +2,7 @@
  * wxwindows.cpp : wxWindows plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: wxwindows.cpp,v 1.9 2002/12/15 18:37:39 ipkiss Exp $
+ * $Id: wxwindows.cpp,v 1.12 2003/02/20 01:52:46 sigmunau Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -79,12 +79,13 @@ private:
  * Module descriptor
  *****************************************************************************/
 vlc_module_begin();
-    add_category_hint( N_("wxWindows"), NULL );
+    add_category_hint( N_("wxWindows"), NULL, VLC_TRUE );
     set_description( (char *) _("wxWindows interface module") );
     set_capability( "interface", 50 );
     set_callbacks( Open, Close );
     add_shortcut( "wxwindows" );
     add_shortcut( "wxwin" );
+    add_shortcut( "wx" );
     set_program( "wxvlc" );
 vlc_module_end();
 
@@ -144,6 +145,16 @@ static void Close( vlc_object_t *p_this )
 /*****************************************************************************
  * Run: wxWindows thread
  *****************************************************************************/
+#if defined( WIN32 )
+HINSTANCE hInstance = 0;
+extern "C" BOOL WINAPI
+DllMain (HANDLE hModule, DWORD fdwReason, LPVOID lpReserved)
+{
+    hInstance = (HINSTANCE)hModule;
+    return TRUE;
+}
+#endif
+
 static void Run( intf_thread_t *p_intf )
 {
 #if !defined( WIN32 )
@@ -154,7 +165,7 @@ static void Run( intf_thread_t *p_intf )
     wxTheApp = new Instance( p_intf );
 
 #if defined( WIN32 )
-    wxEntry( GetModuleHandle(NULL), NULL, NULL, SW_SHOW, TRUE );
+    wxEntry( hInstance/*GetModuleHandle(NULL)*/, NULL, NULL, SW_SHOW, TRUE );
 #else
     wxEntry( 1, p_args );
 #endif