Boost logo

Boost Users :

From: RYAN ROSARIO (uclamathguy_at_[hidden])
Date: 2004-09-06 15:13:39


Hi,

I am writing an MFC program in MSVC7 that must pass a path from one dialog box to another upon pressing a button.

I attempt to pass the path to the next dialog by using a directory iterator:

fs::directory_iterator startIt(scanPath); (***)
where scanPath is an object of type path.
PICtoolProgressWnd temp(this,startIt);
I pass the iterator into the constructor for the second dialog.

When I attempt to run this program, my program just hangs after clicking the button and I cannot exit it. The second dialog never appears. The only way out is to Alt-Ctrl-Delete out of the program.

The only other clue given is that when the program freezes, the "xstring" file opens with a green arrow pointing at what appears to be a definition of operator= or something of that sort.

I have commented out practically all of my code in the button click event handler and determined that when the iterator is declared, (***) above, the program freezes. When this line is commented out, the program responds.

What could I be doing wrong?? Below is some more code:

//Creating the dialog
if ( temp.DoModal() == IDOK)
{
        //Display results.
}
else
{
        //Are you sure you wish to cancel this process?
}

//Second dialog constructor.
PICtoolProgressWnd::PICtoolProgressWnd(CWnd* pParent /*=NULL*/,
fs::directory_iterator start)
        : CDialog(PICtoolProgressWnd::IDD, pParent)
{
        startScanPath = start;
} //startScanPath is a member variable of type fs::directory_iterator.

Your help is greatly appreciated.

Thanks in Advance,
Ryan

                
---------------------------------
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net