Solved

CFileDialog problem???

Posted on 2002-06-03
4
316 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
4 Comments
 
LVL 12

Accepted Solution

by:
migel earned 100 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to calculate times for developing software? 8 65
notReplace  challenge 53 116
ffmpeg - "rtsp://...... Operation not permitted" 4 74
NotAlone Challenge 20 80
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

895 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now