c - What is the purpose of LVCOLUMN.cchTextMax and LVITEM.cchTextMax? -
i have tried set values of lvcolumn.cchtextmax
, lvitem.cchtextmax
random value (less corresponding string length) , worked, did work mistake or these fields not necessary set?
i have seen examples not use these fields, example: http://www.codeproject.com/articles/9148/c-functions-to-insert-columns-items-and-subitems-i
the documentation lvitem structure has following on cchtextmax
member:
this member used when structure receives item attributes. ignored when structure specifies item attributes. example, cchtextmax ignored during lvm_setitem , lvm_insertitem. read-only during lvn_getdispinfo , other lvn_ notifications.
unless using structure retrieve item information, member ignored. when receiving data have pass pointer buffer psztext
, , communicate size through cchtextmax
member.
this common pattern throughout windows api, same structure used set , query values. semantics of individual members depend on direction. other common structures, used in similar fashion include tvitem or menuiteminfo, example.
Comments
Post a Comment