Hi Guys
how can i display all files in a folder in a combobox they will mainly be mp3 type files then dispaly the file name in a editbox
and what would be better for this a listbox or combobox
TIA
how to display filetypes
Moderators: CEGUI MVP, CEGUI Team
- scriptkid
- Home away from home
- Posts: 1178
- Joined: Wed Jan 12, 2005 12:06
- Location: The Hague, The Netherlands
- Contact:
Hi,
Cegui does not provide such browse features, you'd need a local API to browse a directory for files. After that it's mainly storing all found entries in your list, like you had to do earlier when storing Image names into a ListBox
The list type mainly depends on your specs. A Combobox already has an Editbox for example, which might make things a bit more straightforward.
HTH.
Cegui does not provide such browse features, you'd need a local API to browse a directory for files. After that it's mainly storing all found entries in your list, like you had to do earlier when storing Image names into a ListBox
The list type mainly depends on your specs. A Combobox already has an Editbox for example, which might make things a bit more straightforward.
HTH.
Check out my released snake game using Cegui!
- scriptkid
- Home away from home
- Posts: 1178
- Joined: Wed Jan 12, 2005 12:06
- Location: The Hague, The Netherlands
- Contact:
Yes, you need a combination of FindFirstFile and FindNextFile, as shown in this sample: http://msdn.microsoft.com/en-us/library/aa365200(VS.85).aspx
It's a bit verbose, but you need the part from:
And the the loop below it.
HTH
It's a bit verbose, but you need the part from:
Code: Select all
// Find the first file in the directory.
hFind = FindFirstFile(szDir, &ffd);
And the the loop below it.
HTH
Check out my released snake game using Cegui!
Who is online
Users browsing this forum: No registered users and 7 guests