Opened 7 years ago

Closed 7 years ago

#57 closed defect (duplicate)

winrar password box

Reported by: abwillis Owned by:
Priority: major Milestone: general enhancement
Component: odin Version:
Severity: low Keywords:
Cc:

Description

winrar requires GetComboBoxInfo? for it password box, I cannot test this code as with the GCC/KMK changeover Odin will crashes:

Index: include/win/winuser.h
===================================================================
--- include/win/winuser.h	(revision 21924)
+++ include/win/winuser.h	(working copy)
@@ -1922,6 +1922,7 @@
 #define CB_GETDROPPEDWIDTH       0x015f
 #define CB_SETDROPPEDWIDTH       0x0160
 #define CB_INITSTORAGE           0x0161
+#define CB_GETCOMBOBOXINFO       0x0164
 
 /* Combo box notification codes */
 #define CBN_ERRSPACE        (-1)
@@ -3355,9 +3356,9 @@
 #endif /* defined(_WINGDI_) && !defined(NOGDI) */
 
 HKL         WINAPI ActivateKeyboardLayout(HKL,UINT);
-LONG        WINAPI BroadcastSystemMessageA(DWORD,LPDWORD,UINT,WPARAM,LPARAM); 
-LONG        WINAPI BroadcastSystemMessageW(DWORD,LPDWORD,UINT,WPARAM,LPARAM); 
-#define     BroadcastSystemMessage WINELIB_NAME_AW(BroadcastSystemMessage) 
+LONG        WINAPI BroadcastSystemMessageA(DWORD,LPDWORD,UINT,WPARAM,LPARAM);
+LONG        WINAPI BroadcastSystemMessageW(DWORD,LPDWORD,UINT,WPARAM,LPARAM);
+#define     BroadcastSystemMessage WINELIB_NAME_AW(BroadcastSystemMessage)
 WORD        WINAPI CascadeWindows(HWND, UINT, const LPRECT, UINT, const HWND *);
 BOOL        WINAPI CascadeChildWindows(HWND, DWORD);
 INT       WINAPI CopyAcceleratorTableA(HACCEL,LPACCEL,INT);
Index: src/user32/combo.c
===================================================================
--- src/user32/combo.c	(revision 21924)
+++ src/user32/combo.c	(working copy)
@@ -1885,7 +1885,24 @@
    }
 }
 
+static LRESULT COMBO_GetComboBoxInfo(const HEADCOMBO *lphc, COMBOBOXINFO *pcbi)
+{
+    if (!pcbi || (pcbi->cbSize < sizeof(COMBOBOXINFO)))
+        return FALSE;
 
+    pcbi->rcItem = lphc->textRect;
+    pcbi->rcButton = lphc->buttonRect;
+    pcbi->stateButton = 0;
+    if (lphc->wState & CBF_BUTTONDOWN)
+        pcbi->stateButton |= STATE_SYSTEM_PRESSED;
+    if (IsRectEmpty(&lphc->buttonRect))
+        pcbi->stateButton |= STATE_SYSTEM_INVISIBLE;
+    pcbi->hwndCombo = lphc->self;
+    pcbi->hwndItem = lphc->hWndEdit;
+    pcbi->hwndList = lphc->hWndLBox;
+    return TRUE;
+}
+
 /***********************************************************************
  *           ComboWndProc_common
  *
@@ -2278,7 +2295,8 @@
     case CB_GETEXTENDEDUI16:
     case CB_GETEXTENDEDUI:
         return  (lphc->wState & CBF_EUI) ? TRUE : FALSE;
-
+    case CB_GETCOMBOBOXINFO:
+        return COMBO_GetComboBoxInfo(lphc, (COMBOBOXINFO *)lParam);
     default:
         if (message >= WM_USER)
             WARN("unknown msg WM_USER+%04x wp=%04x lp=%08lx\n",
@@ -2309,3 +2327,13 @@
     if (!IsWindow(hwnd)) return 0;
     return ComboWndProc_common( hwnd, message, wParam, lParam, TRUE );
 }
+
+/*************************************************************************
+ *           GetComboBoxInfo   (USER32.@)
+ */
+BOOL WINAPI GetComboBoxInfo(HWND hwndCombo,      /* [in] handle to combo box */
+                PCOMBOBOXINFO pcbi   /* [in/out] combo box information */)
+{
+    TRACE("(%p, %p)\n", hwndCombo, pcbi);
+    return SendMessageW(hwndCombo, CB_GETCOMBOBOXINFO, 0, (LPARAM)pcbi);
+}
Index: src/user32/user32.def
===================================================================
--- src/user32/user32.def	(revision 21924)
+++ src/user32/user32.def	(working copy)
@@ -769,3 +769,6 @@
 
     "_RunOnAuxThread@20"                                         @2048 NONAME
     "_RunOnAuxThreadAndWait@24"                                  @2049 NONAME
+
+; New but not used by Flash
+    "_GetComboBoxInfo@8"                                         @2050

Change History (1)

comment:1 Changed 7 years ago by diver

  • Resolution set to duplicate
  • Status changed from new to closed

duplicate of ticket:58

Note: See TracTickets for help on using tickets.