简体   繁体   中英

Are LVITEM fields puColumns and piColFmt pointers or integers?

After discovering the fields of LVITEM for 64 bit in this question , there is one last thing I don't know. The documentation says that:

  1. puColumns is a UINT. It is a pointer to an array of column indices, specifying which columns are displayed for this item, and the order of those columns.
  2. piColFmt is a int. It is a pointer to an array of the following flags (alone or in combination), specifying the format of each subitem in extended tile view.

My question is why they are integers and not pointers? And in a 64 bit architecture, should they take 8 bytes like pointers or 4 bytes like integers?

Thank you!

So the Windows SDK says:

typedef struct tagLVITEMA
{
    UINT mask;
    int iItem;
    int iSubItem;
    UINT state;
    UINT stateMask;
    LPSTR pszText;
    int cchTextMax;
    int iImage;
    LPARAM lParam;
#if (_WIN32_IE >= 0x0300)
    int iIndent;
#endif
#if (_WIN32_WINNT >= 0x0501)
    int iGroupId;
    UINT cColumns; // tile view columns
    PUINT puColumns;
#endif
#if _WIN32_WINNT >= 0x0600 // Will be unused downlevel, but sizeof(LVITEMA) must be equal to sizeof(LVITEMW)
    int* piColFmt;
    int iGroup; // readonly. only valid for owner data.
#endif
} LVITEMA, *LPLVITEMA;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM