39 length = String->Length /
sizeof(WCHAR);
42 for (i = 0; i < length; i++)
44 switch (String->Buffer[i])
63 runStart = &String->Buffer[i];
93 for (i = 0; i < Rows; i++)
96 memset(table[i], 0,
sizeof(
PPH_STRING) * Columns);
132 memset(tabCount, 0,
sizeof(ULONG) * Columns);
134 for (i = 0; i < Rows; i++)
136 for (j = 0; j < Columns; j++)
141 newCount = (ULONG)(Table[i][j]->Length /
sizeof(WCHAR) /
TAB_SIZE);
146 if (tabCount[j] < newCount)
147 tabCount[j] = newCount;
158 for (i = 0; i < Rows; i++)
168 for (j = 0; j < Columns; j++)
175 k = (ULONG)(tabCount[j] + 1 - Table[i][j]->Length /
sizeof(WCHAR) /
TAB_SIZE);
190 for (j = 0; j < Columns; j++)
197 k = (ULONG)((tabCount[j] + 1) *
TAB_SIZE - Table[i][j]->Length /
sizeof(WCHAR));
212 for (j = 0; j < Columns; j++)
223 if (j != Columns - 1)
237 _In_ HWND TreeNewHandle,
238 _Out_opt_ PULONG *DisplayToId,
239 _Out_opt_ PWSTR **DisplayToText,
240 _Out_ PULONG NumberOfColumns
244 ULONG numberOfColumns;
246 PWSTR *displayToText;
253 displayToId = PhAllocate(numberOfColumns *
sizeof(ULONG));
258 displayToId[0] = fixedColumn->
Id;
267 displayToText = PhAllocate(numberOfColumns *
sizeof(PWSTR));
269 for (i = 0; i < numberOfColumns; i++)
273 displayToText[i] = column.
Text;
277 *DisplayToText = displayToText;
281 *DisplayToId = displayToId;
285 *NumberOfColumns = numberOfColumns;
289 _In_ HWND TreeNewHandle,
290 _Reserved_ ULONG Reserved
305 for (i = 0; i < rows; i++)
310 assert(getCellText.
Node);
315 for (j = 0; j < columns; j++)
317 getCellText.
Id = displayToId[j];
338 _In_ HWND TreeNewHandle,
348 PWSTR *displayToText;
357 rows = numberOfNodes + 1;
362 for (i = 0; i < columns; i++)
365 for (i = 0; i < numberOfNodes; i++)
373 for (j = 0; j < columns; j++)
377 getCellText.
Node = node;
378 getCellText.
Id = displayToId[j];
387 for (j = 0; j < columns; j++)
405 _In_ HWND ListViewHandle,
406 _Out_writes_(Count) PULONG DisplayToId,
407 _Out_writes_opt_(Count)
PPH_STRING *DisplayToText,
409 _Out_ PULONG NumberOfColumns
418 lvColumn.mask = LVCF_ORDER | LVCF_TEXT;
419 lvColumn.pszText = buffer;
420 lvColumn.cchTextMax =
sizeof(buffer) /
sizeof(WCHAR);
422 for (i = 0; i < Count; i++)
424 if (ListView_GetColumn(ListViewHandle, i, &lvColumn))
428 displayIndex = (ULONG)lvColumn.iOrder;
429 assert(displayIndex < Count);
430 DisplayToId[displayIndex] = i;
443 *NumberOfColumns = count;
447 _In_ HWND ListViewHandle,
449 _In_ INT SubItemIndex
453 SIZE_T allocatedCount;
462 allocatedCount = 256;
463 count = allocatedCount;
465 while (count >= allocatedCount)
474 lvItem.iSubItem = SubItemIndex;
475 lvItem.cchTextMax = (INT)allocatedCount + 1;
476 lvItem.pszText = buffer->
Buffer;
477 count = SendMessage(ListViewHandle, LVM_GETITEMTEXT, Index, (LPARAM)&lvItem);
487 _In_ HWND ListViewHandle
492 ULONG displayToId[100];
501 rows = ListView_GetItemCount(ListViewHandle);
505 for (i = 0; i < rows; i++)
507 if (!(ListView_GetItemState(ListViewHandle, i, LVIS_SELECTED) & LVIS_SELECTED))
510 for (j = 0; j < columns; j++)
529 _In_ HWND ListViewHandle,
537 ULONG displayToId[100];
545 rows = ListView_GetItemCount(ListViewHandle) + 1;
553 for (i = 0; i < columns; i++)
554 table[0][i] = displayToText[i];
557 for (i = 1; i < rows; i++)
559 for (j = 0; j < columns; j++)