Ignore:
Timestamp:
Aug 14, 1999, 6:13:16 PM (26 years ago)
Author:
cbratschi
Message:

wine-990731 update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/comctl32/comboex.c

    r94 r496  
    1 /* $Id: comboex.c,v 1.3 1999-06-10 16:21:57 achimha Exp $ */
     1/* $Id: comboex.c,v 1.4 1999-08-14 16:13:09 cbratschi Exp $ */
    22/*
    33 * ComboBoxEx control
     
    1616 *
    1717 * FIXME:
    18  *   - should include "combo.h" 
     18 *   - should include "combo.h"
    1919 */
    2020
     
    5050
    5151    if ((GetWindowLongA (hwnd, GWL_STYLE) & CBS_DROPDOWNLIST) != CBS_DROPDOWN)
    52         return 0;
     52        return 0;
    5353
    5454//    TRACE (comboex, "-- 0x%x\n", GetDlgItem (infoPtr->hwndCombo, ID_CB_EDIT));
     
    103103
    104104    if ((DWORD)wParam) {
    105         infoPtr->dwExtStyle = (infoPtr->dwExtStyle & ~(DWORD)wParam) | (DWORD)lParam;
     105        infoPtr->dwExtStyle = (infoPtr->dwExtStyle & ~(DWORD)wParam) | (DWORD)lParam;
    106106    }
    107107    else
    108         infoPtr->dwExtStyle = (DWORD)lParam;
     108        infoPtr->dwExtStyle = (DWORD)lParam;
    109109
    110110    /* FIXME: repaint?? */
     
    150150//    FIXME (comboex, "(0x%x 0x%x 0x%lx): stub\n", uMsg, wParam, lParam);
    151151
    152     if (infoPtr->hwndCombo)   
    153         return SendMessageA (infoPtr->hwndCombo, uMsg, wParam, lParam);
     152    if (infoPtr->hwndCombo)
     153        return SendMessageA (infoPtr->hwndCombo, uMsg, wParam, lParam);
    154154
    155155    return 0;
     
    166166    infoPtr = (COMBOEX_INFO *)COMCTL32_Alloc (sizeof(COMBOEX_INFO));
    167167    if (infoPtr == NULL) {
    168 //      ERR (comboex, "could not allocate info memory!\n");
    169         return 0;
     168//      ERR (comboex, "could not allocate info memory!\n");
     169        return 0;
    170170    }
    171171
     
    178178    /* create combo box */
    179179    dwComboStyle = GetWindowLongA (hwnd, GWL_STYLE) &
    180                         (CBS_SIMPLE|CBS_DROPDOWN|CBS_DROPDOWNLIST|WS_CHILD);
     180                        (CBS_SIMPLE|CBS_DROPDOWN|CBS_DROPDOWNLIST|WS_CHILD);
    181181
    182182    infoPtr->hwndCombo = CreateWindowA ("ComboBox", "",
    183                         WS_CHILD | WS_VISIBLE | CBS_OWNERDRAWFIXED | dwComboStyle,
    184                         0, 0, 0, 0, hwnd, (HMENU)1,
    185                         GetWindowLongA (hwnd, GWL_HINSTANCE), NULL);
     183                        WS_CHILD | WS_VISIBLE | CBS_OWNERDRAWFIXED | dwComboStyle,
     184                        0, 0, 0, 0, hwnd, (HMENU)1,
     185                        GetWindowLongA (hwnd, GWL_HINSTANCE), NULL);
    186186
    187187    return 0;
     
    196196
    197197    if (infoPtr->hwndCombo)
    198         DestroyWindow (infoPtr->hwndCombo);
     198        DestroyWindow (infoPtr->hwndCombo);
    199199
    200200
     
    217217
    218218    MoveWindow (infoPtr->hwndCombo, 0, 0, rect.right -rect.left,
    219                   rect.bottom - rect.top, TRUE);
    220 
    221     return 0;
    222 }
    223 
    224 
    225 LRESULT WINAPI
     219                  rect.bottom - rect.top, TRUE);
     220
     221    return 0;
     222}
     223
     224
     225static LRESULT WINAPI
    226226COMBOEX_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
    227227{
    228228    switch (uMsg)
    229229    {
    230 /*      case CBEM_DELETEITEM: */
    231 
    232         case CBEM_GETCOMBOCONTROL:
    233             return COMBOEX_GetComboControl (hwnd, wParam, lParam);
    234 
    235         case CBEM_GETEDITCONTROL:
    236             return COMBOEX_GetEditControl (hwnd, wParam, lParam);
    237 
    238         case CBEM_GETEXTENDEDSTYLE:
    239             return COMBOEX_GetExtendedStyle (hwnd, wParam, lParam);
    240 
    241         case CBEM_GETIMAGELIST:
    242             return COMBOEX_GetImageList (hwnd, wParam, lParam);
    243 
    244 /*      case CBEM_GETITEM32A:
    245         case CBEM_GETITEM32W:
    246         case CBEM_GETUNICODEFORMAT:
    247         case CBEM_HASEDITCHANGED:
     230/*      case CBEM_DELETEITEM: */
     231
     232        case CBEM_GETCOMBOCONTROL:
     233            return COMBOEX_GetComboControl (hwnd, wParam, lParam);
     234
     235        case CBEM_GETEDITCONTROL:
     236            return COMBOEX_GetEditControl (hwnd, wParam, lParam);
     237
     238        case CBEM_GETEXTENDEDSTYLE:
     239            return COMBOEX_GetExtendedStyle (hwnd, wParam, lParam);
     240
     241        case CBEM_GETIMAGELIST:
     242            return COMBOEX_GetImageList (hwnd, wParam, lParam);
     243
     244/*      case CBEM_GETITEM32A:
     245        case CBEM_GETITEM32W:
     246        case CBEM_GETUNICODEFORMAT:
     247        case CBEM_HASEDITCHANGED:
    248248*/
    249249
    250         case CBEM_INSERTITEMA:
    251             return COMBOEX_InsertItemA (hwnd, wParam, lParam);
    252 
    253 /*      case CBEM_INSERTITEM32W: */
    254 
    255         case CBEM_SETEXTENDEDSTYLE:
    256             return COMBOEX_SetExtendedStyle (hwnd, wParam, lParam);
    257 
    258         case CBEM_SETIMAGELIST:
    259             return COMBOEX_SetImageList (hwnd, wParam, lParam);
    260 
    261         case CBEM_SETITEMA:
    262             return COMBOEX_SetItemA (hwnd, wParam, lParam);
    263 
    264 /*      case CBEM_SETITEM32W:
    265         case CBEM_SETUNICODEFORMAT:
     250        case CBEM_INSERTITEMA:
     251            return COMBOEX_InsertItemA (hwnd, wParam, lParam);
     252
     253/*      case CBEM_INSERTITEM32W: */
     254
     255        case CBEM_SETEXTENDEDSTYLE:
     256            return COMBOEX_SetExtendedStyle (hwnd, wParam, lParam);
     257
     258        case CBEM_SETIMAGELIST:
     259            return COMBOEX_SetImageList (hwnd, wParam, lParam);
     260
     261        case CBEM_SETITEMA:
     262            return COMBOEX_SetItemA (hwnd, wParam, lParam);
     263
     264/*      case CBEM_SETITEM32W:
     265        case CBEM_SETUNICODEFORMAT:
    266266*/
    267267
    268         case CB_DELETESTRING:
    269         case CB_FINDSTRINGEXACT:
    270         case CB_GETCOUNT:
    271         case CB_GETCURSEL:
    272         case CB_GETDROPPEDCONTROLRECT:
    273         case CB_GETDROPPEDSTATE:
    274         case CB_GETITEMDATA:
    275         case CB_GETITEMHEIGHT:
    276         case CB_GETLBTEXT:
    277         case CB_GETLBTEXTLEN:
    278         case CB_GETEXTENDEDUI:
    279         case CB_LIMITTEXT:
    280         case CB_RESETCONTENT:
    281         case CB_SELECTSTRING:
    282         case CB_SETCURSEL:
    283         case CB_SETDROPPEDWIDTH:
    284         case CB_SETEXTENDEDUI:
    285         case CB_SETITEMDATA:
    286         case CB_SETITEMHEIGHT:
    287         case CB_SHOWDROPDOWN:
    288             return COMBOEX_Forward (hwnd, uMsg, wParam, lParam);
    289 
    290 
    291         case WM_CREATE:
    292             return COMBOEX_Create (hwnd, wParam, lParam);
    293 
    294         case WM_DESTROY:
    295             return COMBOEX_Destroy (hwnd, wParam, lParam);
    296 
    297         case WM_SIZE:
    298             return COMBOEX_Size (hwnd, wParam, lParam);
    299 
    300         default:
    301 //          if (uMsg >= WM_USER)
    302 //              ERR (comboex, "unknown msg %04x wp=%08x lp=%08lx\n",
    303 //                   uMsg, wParam, lParam);
    304             return DefWindowProcA (hwnd, uMsg, wParam, lParam);
     268        case CB_DELETESTRING:
     269        case CB_FINDSTRINGEXACT:
     270        case CB_GETCOUNT:
     271        case CB_GETCURSEL:
     272        case CB_GETDROPPEDCONTROLRECT:
     273        case CB_GETDROPPEDSTATE:
     274        case CB_GETITEMDATA:
     275        case CB_GETITEMHEIGHT:
     276        case CB_GETLBTEXT:
     277        case CB_GETLBTEXTLEN:
     278        case CB_GETEXTENDEDUI:
     279        case CB_LIMITTEXT:
     280        case CB_RESETCONTENT:
     281        case CB_SELECTSTRING:
     282        case CB_SETCURSEL:
     283        case CB_SETDROPPEDWIDTH:
     284        case CB_SETEXTENDEDUI:
     285        case CB_SETITEMDATA:
     286        case CB_SETITEMHEIGHT:
     287        case CB_SHOWDROPDOWN:
     288            return COMBOEX_Forward (hwnd, uMsg, wParam, lParam);
     289
     290
     291        case WM_CREATE:
     292            return COMBOEX_Create (hwnd, wParam, lParam);
     293
     294        case WM_DESTROY:
     295            return COMBOEX_Destroy (hwnd, wParam, lParam);
     296
     297        case WM_SIZE:
     298            return COMBOEX_Size (hwnd, wParam, lParam);
     299
     300        default:
     301//          if (uMsg >= WM_USER)
     302//              ERR (comboex, "unknown msg %04x wp=%08x lp=%08lx\n",
     303//                   uMsg, wParam, lParam);
     304            return DefWindowProcA (hwnd, uMsg, wParam, lParam);
    305305    }
    306306    return 0;
     
    323323    wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
    324324    wndClass.lpszClassName = WC_COMBOBOXEXA;
    325  
     325
    326326    RegisterClassA (&wndClass);
    327327}
     
    332332{
    333333    if (GlobalFindAtomA (WC_COMBOBOXEXA))
    334         UnregisterClassA (WC_COMBOBOXEXA, (HINSTANCE)NULL);
    335 }
    336 
     334        UnregisterClassA (WC_COMBOBOXEXA, (HINSTANCE)NULL);
     335}
     336
Note: See TracChangeset for help on using the changeset viewer.