2010/1/2 Nikolay Sivov <[email protected]>: > On 1/2/2010 13:56, Jeff Latimer wrote: >> >> On 02/01/10 21:42, Nikolay Sivov wrote: >>> >>> On 1/2/2010 12:48, Jeff Latimer wrote: >>>> >>>> --- >>>> dlls/comctl32/listview.c | 1 + >>>> 1 files changed, 1 insertions(+), 0 deletions(-) >>> >>> Actually setting buffer count is noop here, cause buffer pointer is not >>> set up for dispInfo.item. >> >> Because it is tied up with callbacks, I have observed that the callback >> routine in the app may be the issue here. It looks to be used in at least >> one case. > > It's tied of course, but such partial change isn't clear, if you have a real > problem with that, please file a bug with application or test affected.
>From MSDN (http://msdn.microsoft.com/en-us/library/bb774760%28VS.85%29.aspx), cchTextMax is the maximum number of TCHARs (including NULL) that can be stored in pszText. That is, it supports things like: TCHAR buffer[100]; item.pszText = buffer; item.cchTextMax = sizeof(buffer) / sizeof(TCHAR); That link says that cchTextMax is read-only during LVN_GETDISPINFO and that pszText points to a buffer that can hold cchTextMax TCHARs, but in the LVN_GETDISPINFO example (http://msdn.microsoft.com/en-us/library/bb774818%28VS.85%29.aspx) it uses assignment instead of copy, i.e.: item.pszText = "hello"; instead of: strncpy(item.pszText, "hello", item.cchTextMax); >>> A test required for this - let's say check that an ownerdata listview >>> send LVN_GETDISPINFO before text update and the same thing for callback text >>> (don't remember now maybe similar tests are already in). >>> >> I can do a test but not for 2 weeks (summer holidays). > > Summer? Ok. Southern hemisphere. They get to avoid the snow and cold weather. - Reece
