News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

listview

Started by sudeer, April 20, 2008, 06:09:13 PM

Previous topic - Next topic

sudeer

i can not show the full buffer for subitem #2, it shows only 256 byte only while the addbuffer ==AddBuff   db   1024 dup(0)
why? example would be better......thanks
   mov      lvi.imask,LVIF_TEXT; or LVIF_PARAM or LVIF_STATE
   m2m      lvi.iItem,row
   mov      lvi.iSubItem,0
   mov      lvi.pszText,offset empty
   mov      lvi.cchTextMax,sizeof empty
   invoke   SendMessage,hlistview,LVM_INSERTITEM,0,addr lvi
   inc      lvi.iSubItem
   mov      lvi.pszText,offset cbbuff
   mov      lvi.cchTextMax,sizeof cbbuff
   invoke   SendMessage,hlistview,LVM_SETITEM,0,addr lvi
   inc      lvi.iSubItem
   mov      lvi.cchTextMax,sizeof AddBuff
   mov      lvi.pszText,offset AddBuff
   invoke   SendMessage,hlistview,LVM_SETITEM,0,addr lvi

Artoo

Its a limitation of the ListView control as stated in the MSDN:

pszText
If the structure specifies item attributes, pszText is a pointer to a null-terminated string containing the item text. If the structure receives item attributes, pszText is a pointer to a buffer that receives the item text. Note that although the list-view control allows any length string to be stored as item text, only the first 260 TCHARs are displayed.

sudeer

no one discover a trick to override this limtation

Thanks

sinsi

The limitation is on the number of chars displayed, not the number of chars that can be stored - which can be (I assume) up to the limit of RAM.
Try to guess how long an icon name can be on the desktop (eh? jimg heh heh), it can be as long as the day is short in Greenland in winter...but only the first 260 chars are shown...
Funnily enough, 260 is the maximum length of a path - 256 chars, plus another 3 (C:\), plus the terminating zero (thanks, C).
Light travels faster than sound, that's why some people seem bright until you hear them.

donkey

Quote from: sudeer on April 23, 2008, 01:56:44 PM
no one discover a trick to override this limtation

Thanks

Custom controls, you can write your own listview like control and do whatever you like to it. For an example you might visit Ketil's site and check out RAGrid.

Donkey
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

xandaz

    Hey guys. I'm doing a Resource Enumerator that uses several listview controls to show items of each specified Type. I don't know things work fine except when i enable comctl version 6. The listview controls show neither the item text nor the image. I only used the LVIF_TEXT+LVIF_IMAGE of LVITEM Struct. I used a beeper when sending the LVM_INSERTITEM to check if it returned null and it beeped. Does anyone have a clue to what is going on?
   Thanks guys.
   Bye

xandaz

  Hey...Problem fixed with LVM_REDRAWITEMS. Thanks guys
  Bye and best regards from X.

untio

Hi to all,
In windows 95, 98 and some other ones the maximum length of a path was 260. But with ntfs there is a new problem. The ntfs filesystem supports paths of more than 32000 characters. To use this paths we must prepend the string with: \\?\. With this prefix the function speak directly with the filesystem.
But the problem does not finish here. There is some functions that work with the prefix and some ones that do not work at all. An important example is SHFileOperation that do not work with the prefix. And you must work with UNICODE characters if you want to use this prefix. This is an extract of the explanation of the CreateFile first parameter:
"In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, call the Unicode version of the function and prepend "\\?\" to the path."
I hope that this could be useful to someone.