Hi, I found a problem with tabs with many items that needed scrolling (like in the initial screen of WinUAE, which is freely available at http://www.winuae.net ): when you scroll the tabs to the left (for example, when item 4 is the leftmost visible item in the tab control), and then click on one of the visible items, that item is never selected, instead is always selected item 0, despite of the position (in the tab control) where you've clicked. I begin to examine the code, and found the problem in the function TAB_LButtonDown. It seems that if it executes TAB_RelayEvent (infoPtr->hwndToolTip, hwnd, WM_LBUTTONDOWN, wParam, lParam); before the TAB_InternalHitTest call is made, this last function always returns 0, despite of where have you clicked on. My patch moves that call and the setting of the pt variable before the first try (it's under two different if) of the execution of TAB_RelayEvent, that is immediately after variable declaration of the function (TAB_LButtonDown). Maybe it's not the best way to solve the problem, but at least with my patch it works well. The right solution should be finding and solving the named conflict between TAB_RelayEvent and TAB_InternalHitTest, but I've been unable to find it. Regards, José Manuel ___________________________________________________ Yahoo! Messenger - Nueva versión GRATIS Super Webcam, voz, caritas animadas, y más... http://messenger.yahoo.es
Attachment:
parche_tab_comctl32.diff
Description: parche_tab_comctl32.diff