src/osd/winui/picker.c
| r6272 | r6273 | |
| 184 | 184 | POINT pt; |
| 185 | 185 | |
| 186 | 186 | // 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 |
| 188 | 188 | if (lpNmHdr->code == HDN_ITEMCHANGINGA || lpNmHdr->code == HDN_ITEMCHANGINGW) |
| 189 | 189 | { |
| 190 | 190 | dwPos = GetMessagePos(); |
| r6272 | r6273 | |
| 416 | 416 | else |
| 417 | 417 | ListView_SetTextColor(hWnd, GetListFontColor()); |
| 418 | 418 | |
| 419 | | done: |
| 419 | done: |
| 420 | 420 | if (widths) |
| 421 | 421 | free(widths); |
| 422 | 422 | if (order) |
| r6272 | r6273 | |
| 463 | 463 | // This idle procedure will loop until either idling is over, or until |
| 464 | 464 | // a specified amount of time elapses (in this case, 50ms). This frees |
| 465 | 465 | // idle callbacks of any responsibility for balancing their workloads; the |
| 466 | | // picker code will |
| 466 | // picker code will |
| 467 | 467 | do |
| 468 | 468 | { |
| 469 | 469 | if (pPickerInfo->pCallbacks->pfnOnIdle) |
| r6272 | r6273 | |
| 1086 | 1086 | { |
| 1087 | 1087 | // retrieve item text |
| 1088 | 1088 | nColumn = Picker_GetRealColumnFromViewColumn(hWnd, pDispInfo->item.iSubItem); |
| 1089 | | |
| 1089 | |
| 1090 | 1090 | s = Picker_CallGetItemString(hWnd, nItem, nColumn, |
| 1091 | 1091 | pDispInfo->item.pszText, pDispInfo->item.cchTextMax); |
| 1092 | 1092 | |
| r6272 | r6273 | |
| 1152 | 1152 | pPickerInfo->pCallbacks->pfnGetColumnShown(shown); |
| 1153 | 1153 | hwndHeader = ListView_GetHeader(hWnd); |
| 1154 | 1154 | |
| 1155 | | if (GetUseOldControl() || (nColumnCount = Header_GetItemCount(hWnd)) < 1) |
| 1155 | if (GetUseOldControl() || (nColumnCount = Header_GetItemCount(hwndHeader)) < 1) |
| 1156 | 1156 | { |
| 1157 | 1157 | nColumnCount = 0; |
| 1158 | 1158 | for (i = 0; i < pPickerInfo->nColumnCount ; i++ ) |
| r6272 | r6273 | |
| 1161 | 1161 | nColumnCount++; |
| 1162 | 1162 | } |
| 1163 | 1163 | } |
| 1164 | | |
| 1164 | |
| 1165 | 1165 | free(shown); |
| 1166 | 1166 | return nColumnCount; |
| 1167 | 1167 | } |
| r6272 | r6273 | |
| 1383 | 1383 | if (bDrawAsChild) |
| 1384 | 1384 | { |
| 1385 | 1385 | RECT rect; |
| 1386 | | |
| 1386 | |
| 1387 | 1387 | ListView_GetItemRect(hWnd, nItem, &rect, LVIR_ICON); |
| 1388 | 1388 | |
| 1389 | 1389 | /* indent width of icon + the space between the icon and text |
| r6272 | r6273 | |
| 1422 | 1422 | if (hBackground == NULL) |
| 1423 | 1423 | { |
| 1424 | 1424 | HBRUSH hBrush; |
| 1425 | | |
| 1425 | |
| 1426 | 1426 | hBrush = CreateSolidBrush(GetSysColor(COLOR_WINDOW)); |
| 1427 | 1427 | FillRect(hDC, &rcAllLabels, hBrush); |
| 1428 | 1428 | DeleteBrush(hBrush); |
| 1429 | 1429 | } |
| 1430 | | |
| 1430 | |
| 1431 | 1431 | if (pPickerInfo->pCallbacks->pfnGetOffsetChildren && pPickerInfo->pCallbacks->pfnGetOffsetChildren()) |
| 1432 | 1432 | { |
| 1433 | 1433 | if (bDrawAsChild || bColorChild) |