Click here to Skip to main content
15,887,267 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: file operations very slow Pin
permutations23-Apr-10 4:25
permutations23-Apr-10 4:25 
AnswerRe: file operations very slow Pin
permutations23-Apr-10 4:53
permutations23-Apr-10 4:53 
GeneralRe: file operations very slow Pin
Chris Losinger23-Apr-10 5:17
professionalChris Losinger23-Apr-10 5:17 
GeneralRe: file operations very slow Pin
permutations23-Apr-10 14:36
permutations23-Apr-10 14:36 
AnswerRe: file operations very slow Pin
permutations23-Apr-10 6:28
permutations23-Apr-10 6:28 
QuestionNeed help from freelancer turning a Firefox add-on into an IE extension Pin
marshallg22-Apr-10 10:35
marshallg22-Apr-10 10:35 
AnswerRe: Need help from freelancer turning a Firefox add-on into an IE extension Pin
«_Superman_»22-Apr-10 11:22
professional«_Superman_»22-Apr-10 11:22 
GeneralRe: Need help from freelancer turning a Firefox add-on into an IE extension Pin
Stephen Hewitt22-Apr-10 13:48
Stephen Hewitt22-Apr-10 13:48 
GeneralRe: Need help from freelancer turning a Firefox add-on into an IE extension Pin
«_Superman_»22-Apr-10 18:15
professional«_Superman_»22-Apr-10 18:15 
GeneralRe: Need help from freelancer turning a Firefox add-on into an IE extension Pin
Stephen Hewitt22-Apr-10 20:53
Stephen Hewitt22-Apr-10 20:53 
QuestionCalling COM from C [modified] Pin
Fayu22-Apr-10 10:19
Fayu22-Apr-10 10:19 
AnswerRe: Calling COM from C Pin
Gwenio22-Apr-10 10:50
Gwenio22-Apr-10 10:50 
AnswerRe: Calling COM from C Pin
Richard MacCutchan22-Apr-10 11:09
mveRichard MacCutchan22-Apr-10 11:09 
QuestionGetting absolute address of variable in memory Pin
chapultec22-Apr-10 10:10
chapultec22-Apr-10 10:10 

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.