]> git.sesse.net Git - vlc/commitdiff
* modules/gui/wince: some more code cleanup + fixes.
authorGildas Bazin <gbazin@videolan.org>
Sat, 26 Feb 2005 19:28:41 +0000 (19:28 +0000)
committerGildas Bazin <gbazin@videolan.org>
Sat, 26 Feb 2005 19:28:41 +0000 (19:28 +0000)
12 files changed:
modules/gui/wince/fileinfo.cpp
modules/gui/wince/interface.cpp
modules/gui/wince/iteminfo.cpp
modules/gui/wince/messages.cpp
modules/gui/wince/open.cpp
modules/gui/wince/playlist.cpp
modules/gui/wince/preferences.cpp
modules/gui/wince/subtitles.cpp
modules/gui/wince/video.cpp
modules/gui/wince/wince.cpp
modules/gui/wince/wince.h
modules/gui/wince/wince_rc.rc

index 721bda93b55e344d040d496dccec586aea5ea520..5011011ccc7862f634b66b114895d31593def1cf 100644 (file)
@@ -191,15 +191,10 @@ PURPOSE:
   Processes messages sent to the main window.
   
 ***********************************************************************/
-LRESULT FileInfo::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
-                           PBOOL pbProcessed  )
+LRESULT FileInfo::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
 {
     SHINITDLGINFO shidi;
 
-    LRESULT lResult = CBaseWindow::WndProc( hwnd, msg, wp, lp, pbProcessed );
-    BOOL bWasProcessed = *pbProcessed;
-    *pbProcessed = TRUE;
-
     switch( msg )
     {
     case WM_INITDIALOG: 
@@ -211,25 +206,22 @@ LRESULT FileInfo::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
         CreateTreeView( hwnd );
         UpdateWindow( hwnd );
         SHFullScreen( GetForegroundWindow(), SHFS_HIDESIPBUTTON );
-        return lResult;
+        break;
+
+    case WM_CLOSE:
+        EndDialog( hwnd, LOWORD( wp ) );
+        break;
 
     case WM_COMMAND:
         if ( LOWORD(wp) == IDOK )
         {
             EndDialog( hwnd, LOWORD( wp ) );
-            return TRUE;
-         }
-         *pbProcessed = bWasProcessed;
-         lResult = FALSE;
-         return lResult;
+        }
+        break;
 
     default:
-         // the message was not processed
-         // indicate if the base class handled it
-         *pbProcessed = bWasProcessed;
-         lResult = FALSE;
-         return lResult;
+        break;
     }
 
-    return lResult;
+    return FALSE;
 }
index a47bac302afff303ace92f319852157dbb6f0320..f09cfa7710829080e2079dc1ddd46c3c238acdbb 100644 (file)
@@ -37,7 +37,7 @@
 #include <windows.h>
 #include <windowsx.h>
 #include <commctrl.h>
-#include <commdlg.h> // common dialogs -> fileopen.lib ?
+#include <commdlg.h>
 
 #define NUMIMAGES     9   // Number of buttons in the toolbar           
 #define IMAGEWIDTH    17   // Width of the buttons in the toolbar  
@@ -45,7 +45,6 @@
 #define BUTTONWIDTH   0    // Width of the button images in the toolbar
 #define BUTTONHEIGHT  0    // Height of the button images in the toolbar
 #define ID_TOOLBAR    2000 // Identifier of the main tool bar
-#define dwTBFontStyle TBSTYLE_BUTTON | TBSTYLE_CHECK | TBSTYLE_GROUP // style for toolbar buttons
 
 // Help strings
 #define HELP_SIMPLE _T("Quick file open")
@@ -129,9 +128,14 @@ BOOL Interface::InitInstance( HINSTANCE hInstance, intf_thread_t *_p_intf )
     wc.lpszClassName = _T("VLC WinCE");
     if( !RegisterClass( &wc ) ) return FALSE;
 
+#ifndef WS_OVERLAPPEDWINDOW
+#   define WS_OVERLAPPEDWINDOW 0xcf0000
+#endif
+
     // Create main window
     hwndMain =
-        CreateWindow( _T("VLC WinCE"), _T("VLC media player"), WS_VISIBLE,
+        CreateWindow( _T("VLC WinCE"), _T("VLC media player"),
+                      WS_OVERLAPPEDWINDOW|WS_SIZEBOX|WS_VISIBLE,
                       0, MENU_HEIGHT, CW_USEDEFAULT, CW_USEDEFAULT,
                       NULL, NULL, hInstance, (void *)this );
 
@@ -437,79 +441,79 @@ HWND CreateStatusBar( HWND hwnd, HINSTANCE hInst )
 }
 
 /***********************************************************************
+FUNCTION:
+  CreateDialogBox
+
+PURPOSE:
+  Creates a Dialog Box.
+***********************************************************************/
+int CBaseWindow::CreateDialogBox( HWND hwnd, CBaseWindow *p_obj )
+{
+    uint8_t p_buffer[sizeof(DLGTEMPLATE) + sizeof(WORD) * 4];
+    DLGTEMPLATE *p_dlg_template = (DLGTEMPLATE *)p_buffer;
+    memset( p_dlg_template, 0, sizeof(DLGTEMPLATE) + sizeof(WORD) * 4 );
+
+    // these values are arbitrary, they won't be used normally anyhow
+    p_dlg_template->x  = 34; p_dlg_template->y  = 22;
+    p_dlg_template->cx = 144; p_dlg_template->cy = 75;
+    p_dlg_template->style =
+        DS_MODALFRAME|WS_POPUP|WS_CAPTION|WS_SYSMENU|WS_SIZEBOX;
+
+    return DialogBoxIndirectParam( GetModuleHandle(0), p_dlg_template, hwnd,
+                                  (DLGPROC)p_obj->BaseWndProc, (LPARAM)p_obj );
+}
 
+/***********************************************************************
 FUNCTION: 
   BaseWndProc
 
 PURPOSE: 
   Processes messages sent to the main window.
-  
 ***********************************************************************/
 LRESULT CALLBACK CBaseWindow::BaseWndProc( HWND hwnd, UINT msg, WPARAM wParam,
                                            LPARAM lParam )
 {
+    CBaseWindow *p_obj;
+
     // check to see if a copy of the 'this' pointer needs to be saved
     if( msg == WM_CREATE )
     {
-        CBaseWindow *pObj = reinterpret_cast<CBaseWindow *>
-            ((long)((LPCREATESTRUCT)lParam)->lpCreateParams);
-        ::SetWindowLong( hwnd, GWL_USERDATA,
-                         (LONG)((LPCREATESTRUCT)lParam)->lpCreateParams );
+        p_obj = (CBaseWindow *)(((LPCREATESTRUCT)lParam)->lpCreateParams);
+        SetWindowLong( hwnd, GWL_USERDATA,
+                      (LONG)((LPCREATESTRUCT)lParam)->lpCreateParams );
 
-        pObj->DlgFlag = FALSE;
-        pObj->hWnd = hwnd; // videowindow
+        p_obj->hWnd = hwnd;
     }
 
     if( msg == WM_INITDIALOG )
     {
-        CBaseWindow *pObj = reinterpret_cast<CBaseWindow *>(lParam);
-        ::SetWindowLong( hwnd, GWL_USERDATA, lParam );
-        pObj->DlgFlag = TRUE;
-        pObj->hWnd = hwnd; //streamout
+        p_obj = (CBaseWindow *)lParam;
+        SetWindowLong( hwnd, GWL_USERDATA, lParam );
+        p_obj->hWnd = hwnd;
     }
 
-    BOOL bProcessed = FALSE;
-    LRESULT lResult;
-
     // Retrieve the pointer
-    CBaseWindow *pObj =
-        reinterpret_cast<CBaseWindow *>(::GetWindowLong( hwnd, GWL_USERDATA ));
+    p_obj = (CBaseWindow *)GetWindowLong( hwnd, GWL_USERDATA );
 
-    if( !pObj ) return DefWindowProc( hwnd, msg, wParam, lParam );
+    if( !p_obj ) return DefWindowProc( hwnd, msg, wParam, lParam );
 
     // Filter message through child classes
-    if( pObj )
-        lResult = pObj->WndProc( hwnd, msg, wParam, lParam, &bProcessed );
-
-    if( pObj->DlgFlag )
-        return bProcessed; // processing a dialog message return TRUE if processed
-    else if( !bProcessed )
-        // If message was unprocessed and not a dialog, send it back to Windows
-        lResult = DefWindowProc( hwnd, msg, wParam, lParam );
-
-    return lResult; // processing a window message return FALSE if processed
+    return p_obj->WndProc( hwnd, msg, wParam, lParam );
 }
 
 /***********************************************************************
-
 FUNCTION: 
   WndProc
 
 PURPOSE: 
   Processes messages sent to the main window.
-  
 ***********************************************************************/
 LRESULT CALLBACK Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp,
-                                     LPARAM lp, PBOOL pbProcessed )
+                                     LPARAM lp )
 {
-    // call the base class first
-    LRESULT lResult = CBaseWindow::WndProc( hwnd, msg, wp, lp, pbProcessed );
-    *pbProcessed = TRUE;
-
     switch( msg )
     {
     case WM_CREATE:
-        {
         hwndCB = CreateMenuBar( hwnd, hInst );
         hwndTB = CreateToolBar( hwnd, hInst );
         hwndSlider = CreateSliderBar( hwnd, hInst );
@@ -521,62 +525,59 @@ LRESULT CALLBACK Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp,
 
         /* Video window */
         if( config_GetInt( pIntf, "wince-embed" ) )
-            video = CreateVideoWindow( pIntf, hInst, hwnd );
+            video = CreateVideoWindow( pIntf, hwnd );
 
         ti = new Timer(pIntf, hwnd, this);
 
         // Hide the SIP button (WINCE only)
         SetForegroundWindow( hwnd );
         SHFullScreen( GetForegroundWindow(), SHFS_HIDESIPBUTTON );
-        }
-        return lResult;
+        break;
 
     case WM_COMMAND:
         switch( GET_WM_COMMAND_ID(wp,lp) )
         {
         case ID_FILE_QUICKOPEN: 
             OnOpenFileSimple();
-            return lResult;
+           break;
 
         case ID_FILE_OPENFILE: 
-            open = new OpenDialog( pIntf, hInst, FILE_ACCESS,
-                                   ID_FILE_OPENFILE, OPEN_NORMAL );
-            DialogBoxParam( hInst, (LPCTSTR)IDD_DUMMY, hwnd,
-                            (DLGPROC)open->BaseWndProc, (long)open );
-            delete open;
-            return lResult;
+           open = new OpenDialog( pIntf, hInst, FILE_ACCESS,
+                                  ID_FILE_OPENFILE, OPEN_NORMAL );
+           CreateDialogBox( hwnd, open );
+           delete open;
+           break;
 
         case ID_FILE_OPENNET:
             open = new OpenDialog( pIntf, hInst, NET_ACCESS, ID_FILE_OPENNET,
                                    OPEN_NORMAL );
-            DialogBoxParam( hInst, (LPCTSTR)IDD_DUMMY, hwnd,
-                            (DLGPROC)open->BaseWndProc, (long)open );
+           CreateDialogBox( hwnd, open );
             delete open;
-            return lResult;
+           break;
 
         case PlayStream_Event: 
             OnPlayStream();
-            return lResult;
+           break;
 
         case StopStream_Event: 
             OnStopStream();
-            return lResult;
+           break;
 
         case PrevStream_Event: 
             OnPrevStream();
-            return lResult;
+           break;
 
         case NextStream_Event: 
             OnNextStream();
-            return lResult;
+           break;
 
         case SlowStream_Event: 
             OnSlowStream();
-            return lResult;
+           break;
 
         case FastStream_Event: 
             OnFastStream();
-            return lResult;
+           break;
 
         case ID_FILE_ABOUT: 
         {
@@ -588,40 +589,36 @@ LRESULT CALLBACK Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp,
 
             MessageBox( hwnd, _FROMMB(about.c_str()),
                         _T("About VLC media player"), MB_OK );
-            return lResult;
+           break;
         }
 
         case ID_FILE_EXIT:
             SendMessage( hwnd, WM_CLOSE, 0, 0 );
-            return lResult;
+           break;
 
         case ID_VIEW_STREAMINFO:
             fi = new FileInfo( pIntf, hInst );
-            DialogBoxParam( hInst, (LPCTSTR)IDD_DUMMY, hwnd,
-                            (DLGPROC)fi->BaseWndProc, (long)fi );
+           CreateDialogBox( hwnd, fi );
             delete fi;
-            return lResult;
+           break;
 
         case ID_VIEW_MESSAGES:
             hmsg = new Messages( pIntf, hInst );
-            DialogBoxParam( hInst, (LPCTSTR)IDD_MESSAGES, hwnd,
-                            (DLGPROC)hmsg->BaseWndProc, (long)hmsg );
+           CreateDialogBox( hwnd, hmsg );
             delete hmsg;
-            return lResult;
+           break;
 
         case ID_VIEW_PLAYLIST:
             pl = new Playlist( pIntf, hInst );
-            DialogBoxParam( hInst, (LPCTSTR)IDD_DUMMY, hwnd,
-                            (DLGPROC)pl->BaseWndProc, (long)pl );
+           CreateDialogBox( hwnd, pl );
             delete pl;
-            return lResult;
+           break;
 
         case ID_SETTINGS_PREF:
             pref = new PrefsDialog( pIntf, hInst );
-            DialogBoxParam( hInst, (LPCTSTR)IDD_DUMMY, hwnd,
-                            (DLGPROC)pref->BaseWndProc, (long)pref );
+           CreateDialogBox( hwnd, pref );
             delete pref;
-            return lResult;
+           break;
                   
         default:
             OnMenuEvent( pIntf, GET_WM_COMMAND_ID(wp,lp) );
@@ -631,7 +628,7 @@ LRESULT CALLBACK Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp,
   
     case WM_TIMER:
         ti->Notify();
-        return lResult;
+        break;
 
     case WM_CTLCOLORSTATIC: 
         if( ( (HWND)lp == hwndSlider ) || ( (HWND)lp == hwndVol ) )
@@ -646,19 +643,11 @@ LRESULT CALLBACK Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp,
         break;
 
     case WM_HSCROLL:
-        if( (HWND)lp == hwndSlider )
-        {
-            OnSliderUpdate( wp );
-            return lResult;
-        }
+        if( (HWND)lp == hwndSlider ) OnSliderUpdate( wp );
         break;
 
     case WM_VSCROLL:
-        if( (HWND)lp == hwndVol )
-        {
-            OnChange( wp );
-            return lResult;
-        }
+        if( (HWND)lp == hwndVol ) OnChange( wp );
         break;
 
     case WM_INITMENUPOPUP:
@@ -697,19 +686,20 @@ LRESULT CALLBACK Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp,
                          WM_NOTIFY, wp, lp );
         return lResult;
 #endif
+       break;
 
     case WM_HELP:
         MessageBox (hwnd, _T("Help"), _T("Help"), MB_OK);
-        return lResult;
+       break;
 
     case WM_CLOSE:
         DestroyWindow( hwndCB );
         DestroyWindow( hwnd );
-        return lResult;
+       break;
 
     case WM_DESTROY:
         PostQuitMessage( 0 );
-        return lResult;
+       break;
     }
 
     return DefWindowProc( hwnd, msg, wp, lp );
index 7ec19d2f314cfa02677a7e5156d19636ad2be18b..a26f72d1a18e018e8bca26c8197bec40a2814e20 100644 (file)
@@ -65,18 +65,13 @@ PURPOSE:
   Processes messages sent to the main window.
   
 ***********************************************************************/
-LRESULT ItemInfoDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
-                                 PBOOL pbProcessed  )
+LRESULT ItemInfoDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
 {
     SHINITDLGINFO shidi;
     SHMENUBARINFO mbi;
     INITCOMMONCONTROLSEX iccex;
     RECT rcClient;
 
-    LRESULT lResult = CBaseWindow::WndProc( hwnd, msg, wp, lp, pbProcessed );
-    BOOL bWasProcessed = *pbProcessed;
-    *pbProcessed = TRUE;
-
     switch( msg )
     {
     case WM_INITDIALOG: 
@@ -155,28 +150,25 @@ LRESULT ItemInfoDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
             hwnd, NULL, hInst, NULL );
 
         UpdateInfo();
-        return lResult;
+        break;
+
+    case WM_CLOSE:
+        EndDialog( hwnd, LOWORD( wp ) );
+        break;
 
     case WM_COMMAND:
         if( LOWORD(wp) == IDOK )
         {
             OnOk();
             EndDialog( hwnd, LOWORD( wp ) );
-            return TRUE;
         }
-        *pbProcessed = bWasProcessed;
-        lResult = FALSE;
-        return lResult;
+        break;
 
     default:
-        // the message was not processed
-        // indicate if the base class handled it
-        *pbProcessed = bWasProcessed;
-        lResult = FALSE;
-        return lResult;
+        break;
     }
 
-    return lResult;
+    return FALSE;
 }
 
 /*****************************************************************************
index ca73506f94afa63399b4a3e54bd18ae01f84d1eb..22fe4d3b7748aa59360512991862191bb3d088c2 100644 (file)
@@ -69,8 +69,7 @@ PURPOSE:
   Processes messages sent to the main window.
 
 ***********************************************************************/
-LRESULT Messages::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
-                           PBOOL pbProcessed  )
+LRESULT Messages::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
 {
     SHINITDLGINFO shidi;
 
@@ -79,11 +78,7 @@ LRESULT Messages::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
     int i_dummy;
     HANDLE fichier;
 
-    LRESULT lResult = CBaseWindow::WndProc( hwnd, msg, wp, lp, pbProcessed );
-    BOOL bWasProcessed = *pbProcessed;
-    *pbProcessed = TRUE;
-
-    switch (msg)
+    switch( msg )
     {
     case WM_INITDIALOG: 
         shidi.dwMask = SHIDIM_FLAGS;
@@ -116,22 +111,26 @@ LRESULT Messages::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
         SetTimer( hwnd, 1, 500 /*milliseconds*/, NULL );
 
         SHFullScreen( GetForegroundWindow(), SHFS_HIDESIPBUTTON );
-        return lResult;
+        break;
 
     case WM_TIMER:
         UpdateLog();
-        return lResult;
+        break;
+
+    case WM_CLOSE:
+        EndDialog( hwnd, LOWORD( wp ) );
+        break;
 
     case WM_COMMAND:
         switch( LOWORD(wp) )
         {
         case IDOK:
             EndDialog( hwnd, LOWORD( wp ) );
-            return TRUE;
+            break;
 
         case IDCLEAR:
             ListView_DeleteAllItems( hListView );
-            return TRUE;
+            break;
 
         case IDSAVEAS:  
             memset( &(ofn), 0, sizeof(ofn) );
@@ -170,23 +169,17 @@ LRESULT Messages::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
             }
 
             SHFullScreen( GetForegroundWindow(), SHFS_HIDESIPBUTTON );
-            return TRUE;
+            break;
 
         default:
-            *pbProcessed = bWasProcessed;
-            lResult = FALSE;
-            return lResult;
+            break;
         }
 
     default:
-         // the message was not processed
-         // indicate if the base class handled it
-         *pbProcessed = bWasProcessed;
-         lResult = FALSE;
-         return lResult;
+        break;
     }
 
-    return lResult;
+    return FALSE;
 }
 
 void Messages::UpdateLog()
index 4c9e7fa8fa339aac733375e994ac8cdddfa70ee5..83c56137d272cad88bc858a89d3fee6a8659c5fe 100644 (file)
@@ -93,8 +93,7 @@ PURPOSE:
   Processes messages sent to the main window.
   
 ***********************************************************************/
-LRESULT OpenDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
-                             PBOOL pbProcessed  )
+LRESULT OpenDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
 {
     SHINITDLGINFO shidi;
     SHMENUBARINFO mbi;
@@ -102,10 +101,6 @@ LRESULT OpenDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
     RECT rcClient;
     TC_ITEM tcItem;
 
-    LRESULT lResult = CBaseWindow::WndProc( hwnd, msg, wp, lp, pbProcessed );
-    BOOL bWasProcessed = *pbProcessed;
-    *pbProcessed = TRUE;
-
     switch( msg )
     {
     case WM_INITDIALOG: 
@@ -153,7 +148,6 @@ LRESULT OpenDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
                                   0, hInst, 0 );
 
         // No tooltips for ComboBox
-
         label = CreateWindow( _T("STATIC"),
                               _FROMMB(_("Alternatively, you can build an MRL "
                                        "using one of the following predefined "
@@ -193,48 +187,45 @@ LRESULT OpenDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
         NetPanel( hwnd );
 
         OnPageChange();
+        break;
 
-        return lResult;
+    case WM_CLOSE:
+        EndDialog( hwnd, LOWORD( wp ) );
+        break;
 
     case WM_COMMAND:
         if( LOWORD(wp) == IDOK )
         {
             OnOk();
             EndDialog( hwnd, LOWORD( wp ) );
-            return TRUE;
+            break;
         }
         if( HIWORD(wp) == BN_CLICKED )
         {
             if( (HWND)lp == net_radios[0] )
             {
                 OnNetTypeChange( NetRadio1_Event );
-                return TRUE;
             } else if( (HWND)lp == net_radios[1] )
             {
                 OnNetTypeChange( NetRadio2_Event );
-                return TRUE;
             } else if( (HWND)lp == net_radios[2] )
             {
                 OnNetTypeChange( NetRadio3_Event );
-                return TRUE;
             } else if( (HWND)lp == net_radios[3] )
             {
                 OnNetTypeChange( NetRadio4_Event );
-                return TRUE;
             } else if( (HWND)lp == subsfile_checkbox )
             {
                 OnSubsFileEnable();
-                return TRUE;
             } else if( (HWND)lp == subsfile_button )
             {
                 OnSubsFileSettings( hwnd );
-                return TRUE;
             } else if( (HWND)lp == browse_button )
             {
                 SHFullScreen( GetForegroundWindow(), SHFS_HIDESIPBUTTON );
                 OnFileBrowse();
-                return TRUE;
             } 
+            break;
         }
         if( HIWORD(wp) == EN_CHANGE )
         {
@@ -262,31 +253,17 @@ LRESULT OpenDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
                 OnFilePanelChange();
             }
         }
-
-        *pbProcessed = bWasProcessed;
-        lResult = FALSE;
-        return lResult;
+        break;
 
     case WM_NOTIFY:
-        if( (((NMHDR *)lp)->code) == TCN_SELCHANGE )
-        {
-            OnPageChange();
-            return TRUE;
-        }
-
-        *pbProcessed = bWasProcessed;
-        lResult = FALSE;
-        return lResult;
+        if( (((NMHDR *)lp)->code) == TCN_SELCHANGE ) OnPageChange();
+        break;
 
     default:
-        // the message was not processed
-        // indicate if the base class handled it
-        *pbProcessed = bWasProcessed;
-        lResult = FALSE;
-        return lResult;
+        break;
     }
 
-    return lResult;
+    return FALSE;
 }
 
 /*****************************************************************************
@@ -826,9 +803,7 @@ void OpenDialog::OnSubsFileSettings( HWND hwnd )
 
     /* Show/hide the open dialog */
     SubsFileDialog *subsfile_dialog = new SubsFileDialog( p_intf, hInst );
-    DialogBoxParam( hInst, (LPCTSTR)IDD_DUMMY, hwnd,
-                    (DLGPROC)subsfile_dialog->BaseWndProc,
-                    (long)subsfile_dialog );
+    CreateDialogBox(  hwnd, subsfile_dialog );
 
     subsfile_mrl.clear();
 
index 40102646dc4568d053b300dc584722caae4dc8fc..335adac84ce5e7f185dc7b769a774b391b1c87f1 100644 (file)
@@ -138,32 +138,23 @@ Playlist::Playlist( intf_thread_t *_p_intf, HINSTANCE _hInst )
 }
 
 /***********************************************************************
-
 FUNCTION: 
   WndProc
 
 PURPOSE: 
   Processes messages sent to the main window.
-  
 ***********************************************************************/
-LRESULT Playlist::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
-                           PBOOL pbProcessed )
+LRESULT Playlist::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
 {
     SHINITDLGINFO shidi;
     SHMENUBARINFO mbi;
+    INITCOMMONCONTROLSEX iccex;
+    RECT rect, rectTB;
+    DWORD dwStyle;
 
     int bState;
     playlist_t *p_playlist;
 
-    DWORD dwStyle;
-    RECT rect, rectTB;
-
-    INITCOMMONCONTROLSEX iccex;
-
-    LRESULT lResult = CBaseWindow::WndProc( hwnd, msg, wp, lp, pbProcessed );
-    BOOL bWasProcessed = *pbProcessed;
-    *pbProcessed = TRUE;
-
     switch( msg )
     {
     case WM_INITDIALOG: 
@@ -206,12 +197,7 @@ LRESULT Playlist::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
                                   sizeof (tbButton2) / sizeof (TBBUTTON),
                                   BUTTONWIDTH, BUTTONHEIGHT,
                                   IMAGEWIDTH, IMAGEHEIGHT, sizeof(TBBUTTON) );
-        if( !hwndTB )
-        {
-            *pbProcessed = bWasProcessed;
-            lResult = FALSE;
-            return lResult;
-        }
+        if( !hwndTB ) break;
   
         // Add ToolTips to the toolbar.
         SendMessage( hwndTB, TB_SETTOOLTIPS, (WPARAM) NUMIMAGES,
@@ -227,12 +213,8 @@ LRESULT Playlist::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
         vlc_value_t val; 
         p_playlist = (playlist_t *)
             vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
-        if( p_playlist == NULL )
-        {
-            *pbProcessed = bWasProcessed;
-            lResult = FALSE;
-            return lResult;
-        }
+        if( !p_playlist ) break;
+
         var_Get( p_playlist , "random", &val );
         bState = val.b_bool ? TBSTATE_CHECKED : 0;
         SendMessage( hwndTB, TB_SETSTATE, Random_Event,
@@ -275,140 +257,141 @@ LRESULT Playlist::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
         SetTimer( hwnd, 1, 500 /*milliseconds*/, NULL );
 
         SHFullScreen( GetForegroundWindow(), SHFS_HIDESIPBUTTON );
-
-        return lResult;
+        break;
 
     case WM_TIMER:
         UpdatePlaylist();
-        return lResult;
+        break;
+
+    case WM_CLOSE:
+        EndDialog( hwnd, LOWORD( wp ) );
+        break;
 
     case WM_COMMAND:    
         switch( LOWORD(wp) )
         {
         case IDOK:
             EndDialog( hwnd, LOWORD( wp ) );
-            return TRUE;
+            break;
 
         case ID_MANAGE_OPENPL:
             OnOpen();
             b_need_update = VLC_TRUE;
-            return TRUE;
+            break;
 
         case ID_MANAGE_SAVEPL:
             SHFullScreen( GetForegroundWindow(), SHFS_SHOWSIPBUTTON );
             OnSave();
             SHFullScreen( GetForegroundWindow(), SHFS_HIDESIPBUTTON );
-            return TRUE;
+            break;
 
         case ID_MANAGE_SIMPLEADD:
             SHFullScreen( GetForegroundWindow(), SHFS_SHOWSIPBUTTON );
             OnAddFile();
             SHFullScreen( GetForegroundWindow(), SHFS_HIDESIPBUTTON );
             b_need_update = VLC_TRUE;
-            return TRUE;
+            break;
 
         case ID_MANAGE_ADDMRL:
             SHFullScreen( GetForegroundWindow(), SHFS_SHOWSIPBUTTON );
             OnAddMRL();
             SHFullScreen( GetForegroundWindow(), SHFS_HIDESIPBUTTON );
             b_need_update = VLC_TRUE;
-            return TRUE;
+            break;
 
         case ID_SEL_DELETE:
             OnDeleteSelection();
             b_need_update = VLC_TRUE;
-            return TRUE;
+            break;
 
         case Infos_Event:
             SHFullScreen( GetForegroundWindow(), SHFS_SHOWSIPBUTTON );
             OnPopupInfo( hwnd );
             SHFullScreen( GetForegroundWindow(), SHFS_HIDESIPBUTTON );
             b_need_update = VLC_TRUE;
-            return TRUE;
+            break;
 
         case Up_Event:
             OnUp();
             b_need_update = VLC_TRUE;
-            return TRUE;
+            break;
 
         case Down_Event:
             OnDown();
             b_need_update = VLC_TRUE;
-            return TRUE;
+            break;
 
         case Random_Event:
             OnRandom();
-            return TRUE;
+            break;
 
         case Loop_Event:
             OnLoop();
-            return TRUE;
+            break;
 
         case Repeat_Event:
             OnRepeat();
-            return TRUE;
+            break;
 
         case ID_SORT_TITLE:
             OnSort( ID_SORT_TITLE );
-            return TRUE;
+            break;
 
         case ID_SORT_RTITLE:
             OnSort( ID_SORT_RTITLE );
-            return TRUE;
+            break;
 
         case ID_SORT_AUTHOR:
             OnSort( ID_SORT_AUTHOR );
-            return TRUE;
+            break;
 
         case ID_SORT_RAUTHOR:
             OnSort( ID_SORT_RAUTHOR );
-            return TRUE;
+            break;
 
         case ID_SORT_SHUFFLE:
             OnSort( ID_SORT_SHUFFLE );
-            return TRUE;
+            break;
 
         case ID_SEL_ENABLE:
             OnEnableSelection();
-            return TRUE;
+            break;
 
         case ID_SEL_DISABLE:
             OnDisableSelection();
-            return TRUE;
+            break;
 
         case ID_SEL_INVERT:
             OnInvertSelection();
-            return TRUE;
+            break;
 
         case ID_SEL_SELECTALL:
             OnSelectAll();
-            return TRUE;
+            break;
 
         case PopupPlay_Event:
             OnPopupPlay();
             b_need_update = VLC_TRUE;
-            return TRUE;
+            break;
 
         case PopupDel_Event:
             OnPopupDel();
             b_need_update = VLC_TRUE;
-            return TRUE;
+            break;
 
         case PopupEna_Event:
             OnPopupEna();
             b_need_update = VLC_TRUE;
-            return TRUE;
+            break;
 
         case PopupInfo_Event:
             OnPopupInfo( hwnd );
             SHFullScreen( GetForegroundWindow(), SHFS_HIDESIPBUTTON );
             b_need_update = VLC_TRUE;
-            return TRUE;
+            break;
 
         default:
-            *pbProcessed = bWasProcessed;
-            lResult = FALSE;
-            return lResult;
+            break;
         }
 
     case WM_NOTIFY:
@@ -417,40 +400,31 @@ LRESULT Playlist::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
         {
             SetWindowLong( hwnd, DWL_MSGRESULT,
                            (LONG)ProcessCustomDraw(lp) );
-            return TRUE;
         }
         else if( ( ((LPNMHDR)lp)->hwndFrom == hListView ) &&
                  ( ((LPNMHDR)lp)->code == GN_CONTEXTMENU  ) )
         {                       
             HandlePopupMenu( hwnd, ((PNMRGINFO)lp)->ptAction );
-            return TRUE;
         }
         else if( ( ((LPNMHDR)lp)->hwndFrom == hListView ) &&
                  ( ((LPNMHDR)lp)->code == LVN_COLUMNCLICK  ) )
         {
             OnColSelect( ((LPNMLISTVIEW)lp)->iSubItem );
-            return TRUE;
         }
         else if( ( ((LPNMHDR)lp)->hwndFrom == hListView ) &&
                  ( ((LPNMHDR)lp)->code == LVN_ITEMACTIVATE  ) )
         {
             OnActivateItem( ((LPNMLISTVIEW)lp)->iSubItem );
-            return TRUE;
         }
-
-        *pbProcessed = bWasProcessed;
-        lResult = FALSE;
-        return lResult;
+        break;
 
     default:
          // the message was not processed
          // indicate if the base class handled it
-         *pbProcessed = bWasProcessed;
-         lResult = FALSE;
-         return lResult;
+        break;
     }
 
-    return lResult;
+    return FALSE;
 }
 
 LRESULT Playlist::ProcessCustomDraw( LPARAM lParam )
@@ -886,9 +860,7 @@ void Playlist::ShowInfos( HWND hwnd, int i_item )
     {
         ItemInfoDialog *iteminfo_dialog =
             new ItemInfoDialog( p_intf, hInst, p_item );
-        DialogBoxParam( hInst, (LPCTSTR)IDD_DUMMY, hwnd,
-                        (DLGPROC)iteminfo_dialog->BaseWndProc,
-                        (long)iteminfo_dialog );                
+        CreateDialogBox( hwnd, iteminfo_dialog );                
         UpdateItem( i_item );
         delete iteminfo_dialog;
     }
index 6ecc6ac2c5d934c45b6cbb232ef5aadf90435a96..62f510b0b80592b8d3d4fef52ad266fca5deed4c 100644 (file)
@@ -160,17 +160,12 @@ PURPOSE:
   Processes messages sent to the main window.
 
 ***********************************************************************/
-LRESULT PrefsDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
-                              PBOOL pbProcessed )
+LRESULT PrefsDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
 {
     SHINITDLGINFO shidi;
     SHMENUBARINFO mbi;
     RECT rcClient;
 
-    LRESULT lResult = CBaseWindow::WndProc( hwnd, msg, wp, lp, pbProcessed );
-    BOOL bWasProcessed = *pbProcessed;
-    *pbProcessed = TRUE;
-
     switch( msg )
     {
     case WM_INITDIALOG:
@@ -228,32 +223,30 @@ LRESULT PrefsDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
         prefs_tree = new PrefsTreeCtrl( p_intf, this, hwnd, hInst );
 
         UpdateWindow( hwnd );
-        return lResult;
+        break;
+
+    case WM_CLOSE:
+        EndDialog( hwnd, LOWORD( wp ) );
+        break;
 
     case WM_COMMAND:
         if( LOWORD(wp) == IDOK )
         {
             OnOk();
             EndDialog( hwnd, LOWORD( wp ) );
-            return TRUE;
         }
-        *pbProcessed = bWasProcessed;
-        lResult = FALSE;
-        return lResult;
+        break;
 
     case WM_NOTIFY:
 
-        if ( ( ((LPNMHDR)lp)->hwndFrom == prefs_tree->hwndTV ) &&
-             ( ((LPNMHDR)lp)->code == TVN_SELCHANGED  ) )
+        if( lp && prefs_tree &&
+            ((LPNMHDR)lp)->hwndFrom == prefs_tree->hwndTV &&
+            ((LPNMHDR)lp)->code == TVN_SELCHANGED )
         {
             prefs_tree->OnSelectTreeItem( (NM_TREEVIEW FAR *)(LPNMHDR)lp,
                                           hwnd, hInst );
-            return TRUE;
         }
-
-        *pbProcessed = bWasProcessed;
-        lResult = FALSE;
-        return lResult;
+        break;
 
     case WM_VSCROLL:
     {
@@ -261,7 +254,8 @@ LRESULT PrefsDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
         tvi.mask = TVIF_PARAM;
         tvi.hItem = TreeView_GetSelection( prefs_tree->hwndTV );
         TreeView_GetItem( prefs_tree->hwndTV, &tvi );
-        ConfigTreeData *config_data = prefs_tree->FindModuleConfig( (ConfigTreeData *)tvi.lParam );
+        ConfigTreeData *config_data =
+            prefs_tree->FindModuleConfig( (ConfigTreeData *)tvi.lParam );
         if ( hwnd == config_data->panel->config_window ) 
         {
             int dy;
@@ -288,20 +282,14 @@ LRESULT PrefsDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
 
             config_data->panel->oldvalue = newvalue;                                
         }
+        break;
     }
-    *pbProcessed = bWasProcessed;
-    lResult = FALSE;
-    return lResult;
 
     default:
-        // the message was not processed
-        // indicate if the base class handled it
-        *pbProcessed = bWasProcessed;
-        lResult = FALSE;
-        return lResult;
+        break;
     }
 
-    return lResult;
+    return FALSE;
 }
 
 /*****************************************************************************
index d53d51f63990fb41b8fac86ddca7a327ba27680d..8ca156f66168d34fc4651461bb980382ca23587d 100644 (file)
@@ -62,8 +62,7 @@ PURPOSE:
   Processes messages sent to the main window.
   
 ***********************************************************************/
-LRESULT SubsFileDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
-                                 PBOOL pbProcessed  )
+LRESULT SubsFileDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
 {
     SHINITDLGINFO shidi;
     SHMENUBARINFO mbi;
@@ -77,10 +76,6 @@ LRESULT SubsFileDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
 
     TCHAR psz_text[256];
 
-    LRESULT lResult = CBaseWindow::WndProc( hwnd, msg, wp, lp, pbProcessed );
-    BOOL bWasProcessed = *pbProcessed;
-    *pbProcessed = TRUE;
-
     switch( msg )
     {
     case WM_INITDIALOG:
@@ -224,7 +219,11 @@ LRESULT SubsFileDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
             UDS_SETBUDDYINT | UDS_NOTHOUSANDS,
             0, 0, 0, 0, hwnd, 0, hInst, fps_edit, 16000, 0, (int)f_fps );
 
-        return lResult;
+        break;
+
+    case WM_CLOSE:
+        EndDialog( hwnd, LOWORD( wp ) );
+        break;
 
     case WM_COMMAND:
         if ( LOWORD(wp) == IDOK )
@@ -255,7 +254,7 @@ LRESULT SubsFileDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
             subsfile_mrl.push_back( szFps );
 
             EndDialog( hwnd, LOWORD( wp ) );
-            return TRUE;
+            break;
         }
         if( HIWORD(wp) == BN_CLICKED )
         {
@@ -263,23 +262,15 @@ LRESULT SubsFileDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
             {
                 SHFullScreen( GetForegroundWindow(), SHFS_HIDESIPBUTTON );
                 OnFileBrowse();
-                return TRUE;
             } 
         }
-
-        *pbProcessed = bWasProcessed;
-        lResult = FALSE;
-        return lResult;
+        break;
 
     default:
-        // the message was not processed
-        // indicate if the base class handled it
-        *pbProcessed = bWasProcessed;
-        lResult = FALSE;
-        return lResult;
+        break;
     }
 
-    return lResult;
+    return FALSE;
 }
 
 /*****************************************************************************
index abff2383cb8fbc75bab8efa7df4e03e16c43bd87..d4dcbd000c863a81a959ebd7d262e289f625f4fd 100644 (file)
@@ -52,7 +52,7 @@ class VideoWindow : public CBaseWindow
 {
 public:
     /* Constructor */
-    VideoWindow( intf_thread_t *_p_intf, HINSTANCE _hInst, HWND _p_parent );
+    VideoWindow( intf_thread_t *_p_intf, HWND _p_parent );
     virtual ~VideoWindow();
 
     void *GetWindow( vout_thread_t *, int *, int *, unsigned int *,
@@ -68,24 +68,21 @@ private:
     HWND p_parent;
     vlc_mutex_t lock;
 
-    virtual LRESULT WndProc( HWND hwnd, UINT msg,
-                             WPARAM wParam, LPARAM lParam, PBOOL pbProcessed );
+    virtual LRESULT WndProc( HWND, UINT, WPARAM, LPARAM );
 };
 
 /*****************************************************************************
  * Public methods.
  *****************************************************************************/
-CBaseWindow *CreateVideoWindow( intf_thread_t *p_intf, HINSTANCE hInst,
-                                HWND p_parent )
+CBaseWindow *CreateVideoWindow( intf_thread_t *p_intf, HWND p_parent )
 {
-    return new VideoWindow( p_intf, hInst, p_parent );
+    return new VideoWindow( p_intf, p_parent );
 }
 
 /*****************************************************************************
  * Constructor.
  *****************************************************************************/
-VideoWindow::VideoWindow( intf_thread_t *_p_intf, HINSTANCE _hInst,
-                          HWND _p_parent )
+VideoWindow::VideoWindow( intf_thread_t *_p_intf, HWND _p_parent )
 {
     RECT rect;
     WNDCLASS wc;
@@ -111,7 +108,7 @@ VideoWindow::VideoWindow( intf_thread_t *_p_intf, HINSTANCE _hInst,
     wc.cbClsExtra = 0;
     wc.cbWndExtra = 0;
     wc.hIcon = NULL;
-    wc.hInstance = _hInst;
+    wc.hInstance = GetModuleHandle(0);
     wc.hCursor = NULL;
     wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
     wc.lpszMenuName = NULL;
@@ -122,7 +119,7 @@ VideoWindow::VideoWindow( intf_thread_t *_p_intf, HINSTANCE _hInst,
         _T("VIDEOWINDOW"), _T(""), WS_CHILD | WS_VISIBLE | WS_BORDER,
         0, 20, rect.right - rect.left,
         rect.bottom - rect.top - 2*(MENU_HEIGHT-1) - SLIDER_HEIGHT - 20,
-        p_parent, NULL, _hInst, (void *)this );
+        p_parent, NULL, GetModuleHandle(0), (void *)this );
 
     ShowWindow( p_child_window, SW_SHOW );
     UpdateWindow( p_child_window );
@@ -193,24 +190,9 @@ PURPOSE:
   Processes messages sent to the main window.
 
 ***********************************************************************/
-LRESULT VideoWindow::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
-                              PBOOL pbProcessed  )
+LRESULT VideoWindow::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
 {
-    LRESULT lResult = CBaseWindow::WndProc( hwnd, msg, wp, lp, pbProcessed );
-    BOOL bWasProcessed = *pbProcessed;
-    *pbProcessed = TRUE;
-
-    switch( msg )
-    {
-    default:
-        // the message was not processed
-        // indicate if the base class handled it
-        *pbProcessed = bWasProcessed;
-        lResult = FALSE;
-        return lResult;
-    }
-
-    return lResult;
+    return DefWindowProc( hwnd, msg, wp, lp );
 }
 
 static int ControlWindow( intf_thread_t *p_intf, void *p_window,
index d095223bcec0aa5ed237f371f358d4a98838c45f..09104f3bad20fb0433a84811563e0d374499a364 100644 (file)
@@ -147,10 +147,8 @@ static void Run( intf_thread_t *p_intf )
     if( !pInterface->InitInstance( hInstance, p_intf ) ) return;
 
     // Main message loop
-    int status;
-    while( ( status = GetMessage( &msg, NULL, 0, 0 ) ) != 0 )
+    while( GetMessage( &msg, NULL, 0, 0 ) > 0 )
     {
-        if( status == -1 ) return;
         TranslateMessage( &msg );
         DispatchMessage( &msg );
     }
index 7c0851165e8125166828defab85f8152b821d253..23b4c321bcfea0fd3894cdce72e0eeb5fe55c4c7 100644 (file)
@@ -97,10 +97,9 @@ public:
    virtual ~CBaseWindow() {};
 
    HWND hWnd;                // The main window handle
-   BOOL DlgFlag;             // True if object is a dialog window
 
-   static LRESULT CALLBACK BaseWndProc( HWND hwnd, UINT msg,
-                                        WPARAM wParam, LPARAM lParam );
+   static LRESULT CALLBACK BaseWndProc( HWND, UINT, WPARAM, LPARAM );
+   static int CreateDialogBox( HWND, CBaseWindow * );
 
 protected:
 
@@ -108,9 +107,7 @@ protected:
    HWND            hwndCB;              // The command bar handle
 
    HINSTANCE       GetInstance () const { return hInst; }
-   virtual LRESULT WndProc( HWND hwnd, UINT msg,
-                            WPARAM wParam, LPARAM lParam,
-                            PBOOL pbProcessed ){*pbProcessed = FALSE; return 0;}
+   virtual LRESULT WndProc( HWND, UINT, WPARAM, LPARAM ) = 0;
 };
 
 class FileInfo;
@@ -120,7 +117,7 @@ class Timer;
 class OpenDialog;
 class PrefsDialog;
 
-CBaseWindow *CreateVideoWindow( intf_thread_t *, HINSTANCE, HWND );
+CBaseWindow *CreateVideoWindow( intf_thread_t *, HWND );
 
 /* Main Interface */
 class Interface : public CBaseWindow
@@ -155,8 +152,7 @@ public:
 
 protected:
 
-    virtual LRESULT WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
-                             PBOOL pbProcessed );
+    virtual LRESULT WndProc( HWND, UINT, WPARAM, LPARAM );
 
     void OnOpenFileSimple( void );
     void OnPlayStream( void );
@@ -193,8 +189,7 @@ protected:
     TCHAR szFileInfoClassName[100];     // Main window class name
     TCHAR szFileInfoTitle[100];         // Main window name
 
-    virtual LRESULT WndProc( HWND hwnd, UINT msg,
-                             WPARAM wParam, LPARAM lParam, PBOOL pbProcessed );
+    virtual LRESULT WndProc( HWND, UINT, WPARAM, LPARAM );
     void UpdateFileInfo( HWND );
     BOOL CreateTreeView( HWND );
 };
@@ -211,9 +206,7 @@ protected:
 
     intf_thread_t *p_intf;
 
-    virtual LRESULT WndProc( HWND hwnd, UINT msg,
-                             WPARAM wParam, LPARAM lParam,
-                             PBOOL pbProcessed );
+    virtual LRESULT WndProc( HWND, UINT, WPARAM, LPARAM );
 
     HWND hListView;
     void UpdateLog(void);
@@ -240,9 +233,7 @@ protected:
     void OnOk();
     void UpdateInfo();
 
-    virtual LRESULT WndProc( HWND hwnd, UINT msg,
-                             WPARAM wParam, LPARAM lParam,
-                             PBOOL pbProcessed );
+    virtual LRESULT WndProc( HWND, UINT, WPARAM, LPARAM );
 
     /* Controls for the iteminfo dialog box */
     HWND uri_label;
@@ -274,9 +265,7 @@ protected:
 
     intf_thread_t *p_intf;
 
-    virtual LRESULT WndProc( HWND hwnd, UINT msg,
-                             WPARAM wParam, LPARAM lParam,
-                             PBOOL pbProcessed );
+    virtual LRESULT WndProc( HWND, UINT, WPARAM, LPARAM );
 
     HWND mrl_box;
     HWND mrl_label;
@@ -359,9 +348,7 @@ protected:
     HWND fps_edit;
     HWND fps_spinctrl;
 
-    virtual LRESULT WndProc( HWND hwnd, UINT msg,
-                             WPARAM wParam, LPARAM lParam,
-                             PBOOL pbProcessed );
+    virtual LRESULT WndProc( HWND, UINT, WPARAM, LPARAM );
 
     /* Event handlers (these functions should _not_ be virtual) */
     void OnFileBrowse();
@@ -424,9 +411,7 @@ protected:
     void OnPopupEna();
     void OnPopupInfo( HWND hwnd );
 
-    virtual LRESULT WndProc( HWND hwnd, UINT msg,
-                             WPARAM wParam, LPARAM lParam,
-                             PBOOL pbProcessed );
+    virtual LRESULT WndProc( HWND, UINT, WPARAM, LPARAM );
 };
 
 /* Timer */
@@ -513,9 +498,7 @@ protected:
 
     PrefsTreeCtrl *prefs_tree;
 
-    virtual LRESULT WndProc( HWND hwnd, UINT msg,
-                             WPARAM wParam, LPARAM lParam,
-                             PBOOL pbProcessed );
+    virtual LRESULT WndProc( HWND, UINT, WPARAM, LPARAM );
 };
 
 /*****************************************************************************
index d855743c15603c6e64e63ffad717605cdf45b3bb..e09e36c0b864886f2cff73109332e6264c5d4c87 100644 (file)
@@ -187,27 +187,6 @@ LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
 #pragma code_page(1252)\r
 #endif //_WIN32\r
 \r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Dialog\r
-//\r
-\r
-IDD_DUMMY DIALOG DISCARDABLE  0, 0, 186, 90\r
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU\r
-CAPTION "Dummy"\r
-FONT 8, "System"\r
-BEGIN\r
-END\r
-\r
-IDD_MESSAGES DIALOG DISCARDABLE  0, 0, 138, 90\r
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU\r
-CAPTION "Messages"\r
-FONT 8, "System"\r
-BEGIN\r
-    PUSHBUTTON      "Save as...",IDSAVEAS,76,7,50,14\r
-    PUSHBUTTON      "Clear",IDCLEAR,11,7,50,14\r
-END\r
-\r
 /////////////////////////////////////////////////////////////////////////////\r
 //\r
 // Menubar\r