bugs in combo.c

Martin Vanek vanek at vsoft.sk
Wed Aug 15 15:20:36 CDT 2007


I am from Slovakia but I hope my English is not so bad and you can understand this email.
I have posted some minor bugs in combobox a week ago (ID=9062, with a source text example and pictures documenting what's wrong). Sorry, I am not programming in Linux that's why I am not able to send you a "git" patch. I hope it is not absolute necessary.

I have rebuilt wine 0.9.43 with following changes and it works fine.
Here is the solution:

file: dlls/user32/combo.c

BUG #1: The listbox rectangle in combobox does not keep the height declared in the resource file. There are maximum 5 lines.

-----------------------------------------------------------------------------------------------
Original source, from line 1112:

     if (nDroppedHeight < nHeight)
     {
         if (nItems < 5)
             nDroppedHeight = (nItems+1)*nIHeight;
         else
             nDroppedHeight = 6*nIHeight;
     }
-----------------------------------------------------------------------------------------------
It should be:

     if (nDroppedHeight < nHeight + COMBO_YBORDERSIZE())
     {
         if (nItems < 5)
             nDroppedHeight = (nItems+1)*nIHeight;
     }
-----------------------------------------------------------------------------------------------


BUG #2: It is not possible to change listbox rectangle width. The value in message CB_SETDROPPEDWIDTH is accepted but the rectangle is not recalculated.

-----------------------------------------------------------------------------------------------
Original source, from line 2171

     case CB_SETDROPPEDWIDTH:
         if( (CB_GETTYPE(lphc) != CBS_SIMPLE) &&
             (INT)wParam < 32768 ) lphc->droppedWidth = (INT)wParam;
         return  CB_ERR;
-----------------------------------------------------------------------------------------------
It should be:

     case CB_SETDROPPEDWIDTH:
         if( (CB_GETTYPE(lphc) != CBS_SIMPLE) && (INT)wParam < 32768 )
         {
             lphc->droppedWidth = (INT)wParam;
             COMBO_Size(lphc,FALSE);
             return  CB_OKAY;
         }
         return  CB_ERR;
-----------------------------------------------------------------------------------------------


BUG#3: Not solved yet. Edit control in combobox has no ES_AUTOHSCROLL style by default. When some text from listbox (which does not fit the edit control rectangle) is sent to edit control it becomes horizontal scrollable. It's wrong. The effect is that the right part of text is shown instead of left part. Probably the problem is in Edit control, not Combobox.

Best regards,
Martin Vanek





More information about the wine-patches mailing list