[User32]
[reactos.git] / reactos / dll / win32 / user32 / controls / combo.c
index 99193b1..adeac61 100644 (file)
@@ -74,9 +74,6 @@ static UINT   CBitHeight, CBitWidth;
 #define COMBO_EDITBUTTONSPACE()  0
 #define EDIT_CONTROL_PADDING()   1
 
-//static LRESULT WINAPI ComboWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
-//static LRESULT WINAPI ComboWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
-
 /*********************************************************************
  * combo class descriptor
  */
@@ -1122,7 +1119,7 @@ static void CBDropDown( LPHEADCOMBO lphc )
    if( (rect.bottom + nDroppedHeight) >= mon_info.rcWork.bottom )
       rect.bottom = rect.top - nDroppedHeight;
 
-   SetWindowPos( lphc->hWndLBox, HWND_TOP, rect.left, rect.bottom,
+   SetWindowPos( lphc->hWndLBox, HWND_TOPMOST, rect.left, rect.bottom,
                 lphc->droppedRect.right - lphc->droppedRect.left,
                 nDroppedHeight,
                 SWP_NOACTIVATE | SWP_SHOWWINDOW);
@@ -1840,6 +1837,18 @@ LRESULT WINAPI ComboWndProc_common( HWND hwnd, UINT message,
                                   WPARAM wParam, LPARAM lParam, BOOL unicode )
 {
       LPHEADCOMBO lphc = (LPHEADCOMBO)GetWindowLongPtrW( hwnd, 0 );
+#ifdef __REACTOS__
+      PWND pWnd;
+
+      pWnd = ValidateHwnd(hwnd);
+      if (pWnd)
+      {
+         if (!pWnd->fnid)
+         {
+            NtUserSetWindowFNID(hwnd, FNID_COMBOBOX);
+         }
+      }    
+#endif    
 
       TRACE("[%p]: msg %s wp %08lx lp %08lx\n",
             hwnd, SPY_GetMsgName(message, hwnd), wParam, lParam );
@@ -1858,6 +1867,9 @@ LRESULT WINAPI ComboWndProc_common( HWND hwnd, UINT message,
        }
        case WM_NCDESTROY:
                COMBO_NCDestroy(lphc);
+#ifdef __REACTOS__
+                NtUserSetWindowFNID(hwnd, FNID_DESTROY);
+#endif
                break;/* -> DefWindowProc */
 
        case WM_CREATE:
@@ -2220,6 +2232,7 @@ LRESULT WINAPI ComboWndProc_common( HWND hwnd, UINT message,
        case CB_LIMITTEXT:
                if( lphc->wState & CBF_EDIT )
                        return SendMessageW(lphc->hWndEdit, EM_LIMITTEXT, wParam, lParam);
+                break; // ReactOS!!! removed at revision 38715
 
     case WM_UPDATEUISTATE:
         if (unicode)