Previous 15994 Revisions Next

r6273 Tuesday 3rd November, 2009 at 22:04:42 UTC by Harmony
[OSD] Rolling in the proposed fix from Bugzilla #1861 into Picker_GetNumColumns [Harmony]
[src/osd/winui]picker.c

src/osd/winui/picker.c
r6272r6273
184184   POINT pt;
185185
186186   // This code is for using bitmap in the background
187   // Invalidate the right side of the control when a column is resized         
187   // Invalidate the right side of the control when a column is resized
188188   if (lpNmHdr->code == HDN_ITEMCHANGINGA || lpNmHdr->code == HDN_ITEMCHANGINGW)
189189   {
190190      dwPos = GetMessagePos();
r6272r6273
416416   else
417417      ListView_SetTextColor(hWnd, GetListFontColor());
418418
419done:     
419done:
420420   if (widths)
421421      free(widths);
422422   if (order)
r6272r6273
463463   // This idle procedure will loop until either idling is over, or until
464464   // a specified amount of time elapses (in this case, 50ms).  This frees
465465   // idle callbacks of any responsibility for balancing their workloads; the
466   // picker code will
466   // picker code will
467467   do
468468   {
469469      if (pPickerInfo->pCallbacks->pfnOnIdle)
r6272r6273
10861086         {
10871087            // retrieve item text
10881088            nColumn = Picker_GetRealColumnFromViewColumn(hWnd, pDispInfo->item.iSubItem);
1089           
1089
10901090            s = Picker_CallGetItemString(hWnd, nItem, nColumn,
10911091               pDispInfo->item.pszText, pDispInfo->item.cchTextMax);
10921092
r6272r6273
11521152   pPickerInfo->pCallbacks->pfnGetColumnShown(shown);
11531153   hwndHeader = ListView_GetHeader(hWnd);
11541154
1155   if (GetUseOldControl() || (nColumnCount = Header_GetItemCount(hWnd)) < 1)
1155   if (GetUseOldControl() || (nColumnCount = Header_GetItemCount(hwndHeader)) < 1)
11561156   {
11571157      nColumnCount = 0;
11581158      for (i = 0; i < pPickerInfo->nColumnCount ; i++ )
r6272r6273
11611161            nColumnCount++;
11621162      }
11631163   }
1164   
1164
11651165   free(shown);
11661166   return nColumnCount;
11671167}
r6272r6273
13831383   if (bDrawAsChild)
13841384   {
13851385      RECT rect;
1386     
1386
13871387      ListView_GetItemRect(hWnd, nItem, &rect, LVIR_ICON);
13881388
13891389      /* indent width of icon + the space between the icon and text
r6272r6273
14221422      if (hBackground == NULL)
14231423      {
14241424         HBRUSH hBrush;
1425         
1425
14261426         hBrush = CreateSolidBrush(GetSysColor(COLOR_WINDOW));
14271427         FillRect(hDC, &rcAllLabels, hBrush);
14281428         DeleteBrush(hBrush);
14291429      }
1430     
1430
14311431      if (pPickerInfo->pCallbacks->pfnGetOffsetChildren && pPickerInfo->pCallbacks->pfnGetOffsetChildren())
14321432      {
14331433         if (bDrawAsChild || bColorChild)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team