]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/combobox.cpp
Changed syntax of test for -fvtable-thunks so it works.
[wxWidgets.git] / src / os2 / combobox.cpp
index bea8d0e3debe838000092de241b05f98cd627c0a..038fa35ec555e8a048457bd304effaeda29d0666 100644 (file)
@@ -49,7 +49,7 @@ bool wxComboBox::OS2Command(
 
     switch (uParam)
     {
-        case LN_SELECT:
+        case CBN_LBSELECT:
             if (GetSelection() > -1)
             {
                 wxCommandEvent      vEvent( wxEVT_COMMAND_COMBOBOX_SELECTED
@@ -63,7 +63,7 @@ bool wxComboBox::OS2Command(
             }
             break;
 
-        case EN_CHANGE:
+        case CBN_EFCHANGE:
             {
                 wxCommandEvent      vEvent( wxEVT_COMMAND_TEXT_UPDATED
                                            ,GetId()
@@ -101,6 +101,7 @@ bool wxComboBox::Create(
 , const wxString&                   rsName
 )
 {
+    m_isShown = FALSE;
 
     if (!CreateControl( pParent
                        ,vId
@@ -143,12 +144,7 @@ bool wxComboBox::Create(
     //
     SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
 
-    wxFont*                          pTextFont = new wxFont( 10
-                                                            ,wxMODERN
-                                                            ,wxNORMAL
-                                                            ,wxNORMAL
-                                                           );
-    SetFont(*pTextFont);
+    SetFont(*wxSMALL_FONT);
 
     int                             i;
     for (i = 0; i < n; i++)
@@ -169,7 +165,7 @@ bool wxComboBox::Create(
                                                     ,(PFNWP)wxComboEditWndProc
                                                    );
     ::WinSetWindowULong(GetHwnd(), QWL_USER, (ULONG)this);
-    delete pTextFont;
+    Show(TRUE);
     return TRUE;
 } // end of wxComboBox::Create
 
@@ -403,22 +399,29 @@ bool wxComboBox::ProcessEditMsg(
             switch(vFlag)
             {
                 case KC_CHAR:
-                    return (HandleChar( SHORT1FROMMP(wParam)
+                    return (HandleChar( wParam
                                        ,lParam
                                        ,TRUE /* isASCII */
                                       ));
 
                 case KC_PREVDOWN:
-                    return (HandleKeyDown( SHORT1FROMMP(wParam)
+                    return (HandleKeyDown( wParam
                                           ,lParam
                                          ));
 
                 case KC_KEYUP:
-                    return (HandleKeyUp( SHORT1FROMMP(wParam)
+                    return (HandleKeyUp( wParam
                                         ,lParam
                                        ));
             }
             break;
+
+        case WM_SETFOCUS:
+            if (SHORT1FROMMP((MPARAM)lParam) == TRUE)
+                return(HandleSetFocus((WXHWND)(HWND)wParam));
+            else
+                return(HandleKillFocus((WXHWND)(HWND)wParam));
+            break;
     }
     return FALSE;
 } // end of WinGuiBase_CComboBox::ProcessEditMsg
@@ -440,6 +443,7 @@ MRESULT EXPENTRY wxComboEditWndProc(
         //
         // Forward some messages to the combobox
         //
+        case WM_SETFOCUS:
         case WM_CHAR:
             {
                 wxComboBox*         pCombo = wxDynamicCast( pWin