简体   繁体   English

LVITEM字段是puColumns和piColFmt指针还是整数?

[英]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. 在此问题中发现了LVITEM的64位字段之后,我不知道最后一件事。 The documentation says that: 文档说:

  1. puColumns is a UINT. puColumns是一个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. piColFmt是一个整数。 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? 在64位体系结构中,它们应该像指针一样占用8个字节,还是像整数一样占用4个字节?

Thank you! 谢谢!

So the Windows SDK says: 因此Windows SDK说:

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;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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