Ignore:
Timestamp:
Dec 18, 1999, 9:57:01 PM (26 years ago)
Author:
achimha
Message:

WINE 991212 updates - treeview missing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/comctl32/listview.c

    r1775 r2126  
    1919 *
    2020 * Data structure:
    21  *   LISTVIEW_SetItemCount : empty stub
     21 *   LISTVIEW_SetItemCount : not completed
    2222 *
    2323 * Unicode:
     
    3434 *   LISTVIEW_GetISearchString : not implemented
    3535 *   LISTVIEW_GetBkImage : not implemented
    36  *   LISTVIEW_GetColumnOrderArray : not implemented
    37  *   LISTVIEW_SetColumnOrderArray : not implemented
     36 *   LISTVIEW_GetColumnOrderArray : simple hack only
     37 *   LISTVIEW_SetColumnOrderArray : simple hack only
    3838 *   LISTVIEW_Arrange : empty stub
    3939 *   LISTVIEW_ApproximateViewRect : incomplete
     
    4343 */
    4444
    45 /* WINE 991114 level */
     45/* WINE 991212 level */
    4646
    4747#include <string.h>
     
    20382038  nLast = nItem + LISTVIEW_GetCountPerColumn(hwnd) + 1;
    20392039  nLast = min(nLast, GETITEMCOUNT(infoPtr));
     2040
     2041//AH required for Odin?
     2042#if 0
     2043  /* send cache hint notification */
     2044  if (GetWindowLongA(hwnd,GWL_STYLE) & LVS_OWNERDATA)
     2045  {
     2046    NMLVCACHEHINT nmlv;
     2047
     2048    nmlv.hdr.hwndFrom = hwnd;
     2049    nmlv.hdr.idFrom = GetWindowLongA(hwnd,GWL_ID);
     2050    nmlv.hdr.code = LVN_ODCACHEHINT;
     2051    nmlv.iFrom = nItem;
     2052    nmlv.iTo   = nLast;
     2053
     2054    SendMessageA(GetParent(hwnd), WM_NOTIFY, (WPARAM)nmlv.hdr.idFrom,
     2055                 (LPARAM)&nmlv);
     2056  }
     2057#endif
     2058
    20402059  for (; nItem < nLast; nItem++)
    20412060  {
     
    33323351
    33333352/* LISTVIEW_GetColumnW */
    3334 /* LISTVIEW_GetColumnOrderArray */
     3353
     3354static LRESULT LISTVIEW_GetColumnOrderArray(HWND hwnd, INT iCount, LPINT lpiArray)
     3355{
     3356/*  LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongA(hwnd, 0); */
     3357    INT i;
     3358
     3359    if (!lpiArray)
     3360        return FALSE;
     3361
     3362    /* little hack */
     3363    for (i = 0; i < iCount; i++)
     3364        lpiArray[i] = i;
     3365
     3366    return TRUE;
     3367}
    33353368
    33363369/***
     
    35733606              }
    35743607              strncpy(lpLVItem->pszText, dispInfo.item.pszText, lpLVItem->cchTextMax);
     3608              lpLVItem->pszText[lpLVItem->cchTextMax-1]='\0';
    35753609            }
    35763610            else if (lpLVItem->mask & LVIF_TEXT)
    35773611            {
    35783612              strncpy(lpLVItem->pszText, lpItem->pszText, lpLVItem->cchTextMax);
     3613              lpLVItem->pszText[lpLVItem->cchTextMax-1]='\0';
    35793614            }
    35803615
     
    36683703              }
    36693704              strncpy(lpLVItem->pszText, dispInfo.item.pszText, lpLVItem->cchTextMax);
     3705              lpLVItem->pszText[lpLVItem->cchTextMax-1]='\0';
    36703706            }
    36713707            else if (lpLVItem->mask & LVIF_TEXT)
    36723708            {
    36733709              strncpy(lpLVItem->pszText, lpSubItem->pszText, lpLVItem->cchTextMax);
     3710              lpLVItem->pszText[lpLVItem->cchTextMax-1]='\0';
    36743711            }
    36753712          }
     
    51255162
    51265163/* LISTVIEW_SetColumnW */
    5127 /* LISTVIEW_SetColumnOrderArray */
     5164
     5165/***
     5166 * DESCRIPTION:
     5167 * Sets the column order array
     5168 *
     5169 * PARAMETERS:
     5170 * [I] HWND : window handle
     5171 * [I] INT : number of elements in column order array
     5172 * [I] INT : pointer to column order array
     5173 *
     5174 * RETURN:
     5175 *   SUCCESS : TRUE
     5176 *   FAILURE : FALSE
     5177 */
     5178static LRESULT LISTVIEW_SetColumnOrderArray(HWND hwnd, INT iCount, LPINT lpiArray)
     5179{
     5180/*  LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongA(hwnd, 0); */
     5181
     5182//    FIXME("iCount %d lpiArray %p\n", iCount, lpiArray);
     5183
     5184    if (!lpiArray)
     5185        return FALSE;
     5186
     5187    return TRUE;
     5188}
    51285189
    51295190/***
     
    53185379 * PARAMETER(S):
    53195380 * [I] HWND : window handle
    5320  * [I] INT : item count (prjected number of items)
     5381 * [I] INT : item count (projected number of items)
    53215382 * [I] DWORD : update flags
    53225383 *
     
    53285389{
    53295390  LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO*)GetWindowLongA(hwnd, 0);
     5391
    53305392//  FIXME("(%d %08lx)empty stub!\n", nItems, dwFlags);
     5393
    53315394  if (nItems == 0)
    53325395    return LISTVIEW_DeleteAllItems (hwnd);
     5396
     5397  if (GetWindowLongA(hwnd, GWL_STYLE) & LVS_OWNERDATA)
     5398  {
     5399//    FIXME("LVS_OWNERDATA is set!\n");
     5400  }
     5401  else
     5402  {
    53335403  if (nItems > GETITEMCOUNT(infoPtr))
    53345404{
    53355405    /* append items */
    53365406//    FIXME("append items\n");
     5407
    53375408  }
    53385409  else if (nItems < GETITEMCOUNT(infoPtr))
     
    53405411    /* remove items */
    53415412//    FIXME("remove items\n");
    5342   }
     5413
     5414  }
     5415  }
     5416
    53435417  return TRUE;
    53445418}
     
    69507024
    69517025  case LVM_GETCOLUMNORDERARRAY:
    6952     //FIXME("Unimplemented msg LVM_GETCOLUMNORDERARRAY\n");
    6953     return 0;
    6954 
     7026    return LISTVIEW_GetColumnOrderArray(hwnd, (INT)wParam, (LPINT)lParam);
    69557027
    69567028  case LVM_GETCOLUMNWIDTH:
     
    70827154
    70837155  case LVM_SETCOLUMNORDERARRAY:
    7084     //FIXME("Unimplemented msg LVM_SETCOLUMNORDERARRAY\n");
    7085     return 0;
     7156    return LISTVIEW_SetColumnOrderArray(hwnd, (INT)wParam, (LPINT)lParam);
    70867157
    70877158  case LVM_SETCOLUMNWIDTH:
Note: See TracChangeset for help on using the changeset viewer.