News:

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

ListBox Trouble

Started by G`HOST, December 01, 2005, 06:40:24 PM

Previous topic - Next topic

G`HOST

Hi Guys,
1.How can i change DOS style filename shown in the listbox to the window style(i.e. Long name) in  my app ?(If it can be done)
2.How can i Get the path of an item from the listbox which is set
by the following command

invoke SendMessage,hwndListBox,
       LB_DIR,DDL_HIDDEN or DDL_ARCHIVE or DDL_DIRECTORY or DDL_DRIVES,ADDR Path
; (ADDR Path is the Directory selected by the user from an another Listbox).


G`HOST,

I reformatted you code so it could be read. I run a 1280 pixel wide screen and it still did not fit on the page.

MichaelW

Exactly what do you mean by DOS-style filename? A long name can be composed partially or completely of short (8.3) components and still be a long name, and if it is appearing in a list box then I would suspect that it is a long name.

MSDN: GetLongPathName

MSDN: GetFullPathName

eschew obfuscation

G`HOST

Hi, MichaelW
i see the file names in the listbox in the format ( abcdef~1.xxx )
But i want it to display like .. abcdefghijkl.xxx :8)
But i suppose the APIs you have mentioned will be able to do the trick.So thanx.

zooba

Automatically filling a listbox with directory information is backwards compatibility (with about Windows 3.1). Since Win95 the standard has been to use a tree-view for directories and a list-view for files. Perhaps you should look up the Windows Common Control reference to see if there are suitable messages to achieve the result you are after.