Click here to Skip to main content
15,906,645 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralHelp on List View Pin
emmatty20-Jul-03 0:13
emmatty20-Jul-03 0:13 
GeneralRe: Help on List View Pin
Michael P Butler20-Jul-03 4:25
Michael P Butler20-Jul-03 4:25 
GeneralRe: Help on List View Pin
Ilushka20-Jul-03 20:59
Ilushka20-Jul-03 20:59 
GeneralWM_TIMER and DoModal in Windows XP vs Windows 2000 Pin
lionelzero19-Jul-03 23:34
lionelzero19-Jul-03 23:34 
GeneralRe: WM_TIMER and DoModal in Windows XP vs Windows 2000 Pin
Michael P Butler20-Jul-03 4:28
Michael P Butler20-Jul-03 4:28 
GeneralRe: WM_TIMER and DoModal in Windows XP vs Windows 2000 Pin
lionelzero21-Jul-03 8:56
lionelzero21-Jul-03 8:56 
GeneralRe: WM_TIMER and DoModal in Windows XP vs Windows 2000 Pin
Michael P Butler21-Jul-03 9:17
Michael P Butler21-Jul-03 9:17 
QuestionFind files with CFileFind? Pin
Dominik Reichl19-Jul-03 21:37
Dominik Reichl19-Jul-03 21:37 
Hello,

I am trying to find all files with extension ".lng" in the directory of my application's exe. This is my current code:
m_listLang.ResetContent();

CFileFind ff;
char szThis[MAX_PATH*2];
unsigned long i = 0;
CString csTmp;
BOOL chk_w = FALSE;

GetModuleFileName(NULL, szThis, MAX_PATH * 2);
for(i = strlen(szThis)-1; i > 1; i--) // Extract dir
{
    if(szThis[i] == '\\') { szThis[i] = 0; break; }
}
strcat(szThis, "\\*.lng");

chk_w = ff.FindFile(szThis, 0);
while(chk_w == TRUE)
{
    if(ff.FindNextFile())
    {
        m_listLang.AddString(ff.GetFileTitle());
    }
    else
    {
        chk_w = FALSE;
    }
}

ff.Close();
This should find all *.lng files in the directory of the executable and add their titles (so without extension) to a CListBox.

But it's not working. It always misses one file. I tried to use the FindFile function directly (so without a FindNextFile call), but as stated in MSDN this is not allowed.

Do you have any idea what I am doing wrong? Confused | :confused:

Thanks
-Dominik



_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? Wink | ;)

AnswerRe: Find files with CFileFind? Pin
Ryan Binns19-Jul-03 22:12
Ryan Binns19-Jul-03 22:12 
GeneralRe: Find files with CFileFind? Pin
Dominik Reichl19-Jul-03 22:27
Dominik Reichl19-Jul-03 22:27 
GeneralRe: Find files with CFileFind? Pin
Ryan Binns19-Jul-03 22:29
Ryan Binns19-Jul-03 22:29 
GeneralRe: Find files with CFileFind? Pin
Dominik Reichl19-Jul-03 22:31
Dominik Reichl19-Jul-03 22:31 
GeneralRe: Find files with CFileFind? Pin
Ryan Binns19-Jul-03 22:33
Ryan Binns19-Jul-03 22:33 
GeneralRe: Find files with CFileFind? Pin
Dominik Reichl19-Jul-03 22:38
Dominik Reichl19-Jul-03 22:38 
GeneralRe: Find files with CFileFind? Pin
Ryan Binns19-Jul-03 22:43
Ryan Binns19-Jul-03 22:43 
GeneralRe: Find files with CFileFind? Pin
Dominik Reichl19-Jul-03 22:42
Dominik Reichl19-Jul-03 22:42 
GeneralRe: Find files with CFileFind? Pin
Ryan Binns19-Jul-03 22:44
Ryan Binns19-Jul-03 22:44 
AnswerRe: Find files with CFileFind? Pin
wb20-Jul-03 2:29
wb20-Jul-03 2:29 
GeneralPlease Help I deleted my resource.h file Pin
19-Jul-03 17:08
suss19-Jul-03 17:08 
GeneralRe: Please Help I deleted my resource.h file Pin
Tom Archer19-Jul-03 17:49
Tom Archer19-Jul-03 17:49 
GeneralRe: Please Help I deleted my resource.h file Pin
Member 43419219-Jul-03 18:40
Member 43419219-Jul-03 18:40 
GeneralRe: Please Help I deleted my resource.h file Pin
Tom Archer20-Jul-03 3:04
Tom Archer20-Jul-03 3:04 
GeneralRe: Please Help I deleted my resource.h file Pin
Taka Muraoka20-Jul-03 4:52
Taka Muraoka20-Jul-03 4:52 
GeneralAbout RUNTIME_CLASS Pin
FlyingDancer19-Jul-03 16:14
FlyingDancer19-Jul-03 16:14 
GeneralRe: About RUNTIME_CLASS Pin
Tom Archer19-Jul-03 17:35
Tom Archer19-Jul-03 17:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.