Click here to Skip to main content
15,904,023 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Heap Error Pin
Gary R. Wheeler24-Apr-10 0:22
Gary R. Wheeler24-Apr-10 0:22 
QuestionHave anybody catch an Exception on pdflib 5 ? Pin
mesajflaviu23-Apr-10 1:51
mesajflaviu23-Apr-10 1:51 
AnswerRe: Have anybody catch an Exception on pdflib 5 ? Pin
freakyit23-Apr-10 2:09
freakyit23-Apr-10 2:09 
AnswerRe: Have anybody catch an Exception on pdflib 5 ? Pin
Chris Meech23-Apr-10 5:56
Chris Meech23-Apr-10 5:56 
GeneralRe: Have anybody catch an Exception on pdflib 5 ? Pin
mesajflaviu23-Apr-10 8:13
mesajflaviu23-Apr-10 8:13 
AnswerRe: Have anybody catch an Exception on pdflib 5 ? Pin
mesajflaviu23-Apr-10 8:21
mesajflaviu23-Apr-10 8:21 
Questiongnuwin32 flex problem with iostream when using flex with -+ switch and the header file FlexLexer.h compiling with VS2005 Pin
User 2694223-Apr-10 0:20
professionalUser 2694223-Apr-10 0:20 
AnswerRe: gnuwin32 flex problem with iostream when using flex with -+ switch and the header file FlexLexer.h compiling with VS2005 Pin
Saurabh.Garg23-Apr-10 1:10
Saurabh.Garg23-Apr-10 1:10 
GeneralRe: gnuwin32 flex problem with iostream when using flex with -+ switch and the header file FlexLexer.h compiling with VS2005 Pin
User 2694223-Apr-10 1:28
professionalUser 2694223-Apr-10 1:28 
AnswerRe: gnuwin32 flex problem with iostream when using flex with -+ switch and the header file FlexLexer.h compiling with VS2005 Pin
User 2694223-Apr-10 1:24
professionalUser 2694223-Apr-10 1:24 
GeneralRe: gnuwin32 flex problem with iostream when using flex with -+ switch and the header file FlexLexer.h compiling with VS2005 Pin
flyontheweb20-May-10 1:38
flyontheweb20-May-10 1:38 
QuestionWhy GUI updation is not preferred in Worker Thread Pin
rajajay8222-Apr-10 22:38
rajajay8222-Apr-10 22:38 
AnswerRe: Why GUI updation is not preferred in Worker Thread Pin
Cedric Moonen22-Apr-10 22:54
Cedric Moonen22-Apr-10 22:54 
AnswerRe: Why GUI updation is not preferred in Worker Thread Pin
Eugen Podsypalnikov23-Apr-10 2:02
Eugen Podsypalnikov23-Apr-10 2:02 
Questionhow to use CHtmlEditView in MFC? Pin
sunnyram22-Apr-10 21:03
sunnyram22-Apr-10 21:03 
AnswerRe: how to use CHtmlEditView in MFC? Pin
Richard MacCutchan22-Apr-10 21:20
mveRichard MacCutchan22-Apr-10 21:20 
GeneralRe: how to use CHtmlEditView in MFC? Pin
Stephen Hewitt22-Apr-10 21:23
Stephen Hewitt22-Apr-10 21:23 
GeneralRe: how to use CHtmlEditView in MFC? Pin
sunnyram22-Apr-10 21:59
sunnyram22-Apr-10 21:59 
GeneralRe: how to use CHtmlEditView in MFC? Pin
CPallini22-Apr-10 22:10
mveCPallini22-Apr-10 22:10 
GeneralRe: how to use CHtmlEditView in MFC? Pin
Richard MacCutchan22-Apr-10 22:49
mveRichard MacCutchan22-Apr-10 22:49 
QuestionRe: how to use CHtmlEditView in MFC? Pin
David Crow23-Apr-10 3:38
David Crow23-Apr-10 3:38 
Questionfile operations very slow Pin
permutations22-Apr-10 17:10
permutations22-Apr-10 17:10 
I have a program that does some file operations. It uses the mainframe structure, but not the doc/view. (Doc/view didn't fit with what I was doing, for various reasons.)

The file operations are very simple and I do standard calls, but anything with files takes a very long time. Even just opening the file selection dialog takes a long time. And then selecting a file takes even longer, even though all I'm doing is storing the name of the selected file - might be 5 seconds to open, 5-10 seconds to select. The code:

CFileDialog fdlg
            (true,              // true for File Open, false for Save As
            "bdb",              // Default file extension
            NULL,               // Initial filename appearing in the edit box
            OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST,
            szFilter,           // Filters
            NULL);              // Parent window

// Set the default directory for file open.
fdlg.m_ofn.lpstrInitialDir = OutputDoc;


And then:

if (fdlg.DoModal() == IDOK)
{
          // file validity check snipped - just reads a header
        strcpy(BINFODB, fdlg.m_ofn.lpstrFile);

        pApp->AddToRecentFileList(BINFODB);
        pApp->UpdateTitleBar(&(pApp->m_pMainWnd->m_hWnd));
    }


In another part of the program I do some calculations based on input data, then write out some text files. This takes about 10 seconds on a fast computer. This program was originally written for DOS and much slower machines, yet it seems to take longer in the Windows version though the code for calculating and writing out the files is identical - literally identical (I put the DOS code in a DLL).

What could be causing the sluggishness? My computer has a 2.4 GHz duo processor with 4 gigs of RAM, and I'm running 64-bit Windows 7. This should be a fast machine.

Any thoughts on how I can speed things up? Right now I'm thinking I need to go back to displaying an hour glass during calculations, though this should be unnecessary with today's machines.
AnswerRe: file operations very slow Pin
Gwenio22-Apr-10 17:52
Gwenio22-Apr-10 17:52 
GeneralRe: file operations very slow Pin
permutations23-Apr-10 4:21
permutations23-Apr-10 4:21 
AnswerRe: file operations very slow Pin
Stephen Hewitt22-Apr-10 20:56
Stephen Hewitt22-Apr-10 20:56 

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.