I have something in a ListBox withe a file thing in it where you can nav. through your files. How do I show the full name instead of just DOS name?
Printable View
I have something in a ListBox withe a file thing in it where you can nav. through your files. How do I show the full name instead of just DOS name?
How are you putting the file names in the listbox? Either sending a LB_DIR message or using the DlgDirList() function will result in the full name being displayed.
I am using LB_DIR. When it's in the LB it shows up as something like this:
(example)
progr~1.exe
How do I show:
"program.exe"?
not sure what header this is in...try stdlib.h...here's the list of headers I have at the top of the program I have this in
#include <windows.h>
#include <stdio.h>
#include "resource.h"
#include "resrc1.h"
#include <mmsystem.h>
#include <process.h>
#include <stdio.h>
#include <conio.h>
#include <io.h>
#include <string.h>
#include <stdlib.h>
that help you any?Code:char pathname[255]={0};
struct _finddata_t fileinfo;
long findhandle;
GetDlgItemText(hwnd, IDC_FOLDER, pathname, 255);
strcat(pathname,"*.mp3");
findhandle = _findfirst(pathname,&fileinfo);
if (findhandle==-1)
{
MessageBox(NULL, "Directory Not Found", "Error", MB_OK);
return FALSE;
}
SendMessage(hwndList, LB_ADDSTRING, 0, (LPARAM)fileinfo.name);
while(_findnext(findhandle,&fileinfo)==0)
{
SendMessage(hwndList, LB_ADDSTRING, 0, (LPARAM)fileinfo.name);
}
There is no call to
_findclose()
to terminate the function call