?
Solved

CFileDialog problem???

Posted on 2002-06-03
4
Medium Priority
?
356 Views
Last Modified: 2013-11-20
Friends

I get a strange problem on the following code...

CString cstrInitialFileName = "Something.dat";
CString szExt("dat");
CString sFilter(_T("Curve Files (*.dat)|*.dat|All Files (*.*)|*.*||"));
         
CFileDialog dlg(TRUE, szExt, cstrInitialFileName, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, (LPCTSTR) sFilter, NULL);

if (dlg.DoModal() == IDOK)
   CString cstrFileName = dlg.GetPathName();



If I run this code on Windows NT 4.0 and see the Task manager, there is an addtional thread is creating for this opendialog box and which is not releasing. but same code if run on windows 2000, the number of additonal thread count iam getting more than 4, and sometime its grows.

Friends do i have take any additional steps inorder to call CFileDialog on windows 2000????

Expecting some suggetions!!!
Thanks
Hari

0
Comment
Question by:pphari
2 Comments
 
LVL 12

Accepted Solution

by:
migel earned 400 total points
ID: 7053230
Hi!
it is behavior by design - File Common dialog uses extra threads to access file system info (dirs tree and so on)..
You can`t restrict this (except you write your own dialog from scratch)
Good luck.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7055849
Also, it is nothing to worry about.  It is not a massive resource leak.  Just a couple of tallies that make no difference to anything.

-- Dan
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month13 days, 14 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question