Click here to Skip to main content
15,891,033 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionProper #include sequence Pin
Trevor Johansen15-Jul-10 15:21
Trevor Johansen15-Jul-10 15:21 
AnswerRe: Proper #include sequence Pin
coder21k15-Jul-10 19:28
coder21k15-Jul-10 19:28 
GeneralRe: Proper #include sequence Pin
Trevor Johansen15-Jul-10 19:54
Trevor Johansen15-Jul-10 19:54 
AnswerRe: Proper #include sequence Pin
Aescleal15-Jul-10 21:23
Aescleal15-Jul-10 21:23 
GeneralRe: Proper #include sequence Pin
Trevor Johansen16-Jul-10 21:13
Trevor Johansen16-Jul-10 21:13 
QuestionAllocating memory Pin
ALLERSLIT15-Jul-10 6:31
ALLERSLIT15-Jul-10 6:31 
AnswerRe: Allocating memory Pin
Emilio Garavaglia15-Jul-10 7:24
Emilio Garavaglia15-Jul-10 7:24 
AnswerRe: Allocating memory Pin
elchupathingy15-Jul-10 8:34
elchupathingy15-Jul-10 8:34 
Depending on how you are getting the content the answer is different. Reading from a file is simple.

But, if you are getting the website content from a web server then all you have to do is parse the HTTP return headers for the Content-Length header option. This will give you the size of the buffer that is required. From here you can make the new buffer and store the rest of the web page into the newly allocated buffer, or you can take the size and resend the same request after finding out the required buffer size. Skipping the headers by looking for \r\n\r\n in the buffer and once this is found to begin storing the website contents.

So, in both cases you need to dynamically allocate the buffer as stated before, but it all depends on how you are reading the website content, from file or from a web server.
AnswerRe: Allocating memory Pin
Richard MacCutchan15-Jul-10 8:56
mveRichard MacCutchan15-Jul-10 8:56 
GeneralRe: Allocating memory Pin
ALLERSLIT15-Jul-10 13:59
ALLERSLIT15-Jul-10 13:59 
QuestionFind the installed version of MS Word Pin
sashoalm15-Jul-10 4:12
sashoalm15-Jul-10 4:12 
AnswerRe: Find the installed version of MS Word Pin
Code-o-mat15-Jul-10 5:45
Code-o-mat15-Jul-10 5:45 
AnswerRe: Find the installed version of MS Word Pin
Richard MacCutchan15-Jul-10 5:58
mveRichard MacCutchan15-Jul-10 5:58 
AnswerRe: Find the installed version of MS Word Pin
Cool_Dev15-Jul-10 18:44
Cool_Dev15-Jul-10 18:44 
GeneralRe: Find the installed version of MS Word [modified] Pin
enhzflep15-Jul-10 21:39
enhzflep15-Jul-10 21:39 
GeneralRe: Find the installed version of MS Word Pin
sashoalm15-Jul-10 22:16
sashoalm15-Jul-10 22:16 
GeneralRe: Find the installed version of MS Word [modified] Pin
Cool_Dev16-Jul-10 2:22
Cool_Dev16-Jul-10 2:22 
QuestionCreateFile - " file is being used by another process." [modified] Pin
Cvaji15-Jul-10 2:31
Cvaji15-Jul-10 2:31 
AnswerRe: CreateFile - " file is being used by another process." Pin
Niklas L15-Jul-10 2:41
Niklas L15-Jul-10 2:41 
AnswerRe: CreateFile - " file is being used by another process." Pin
Naveen15-Jul-10 3:18
Naveen15-Jul-10 3:18 
GeneralRe: CreateFile - " file is being used by another process." Pin
Cvaji15-Jul-10 3:30
Cvaji15-Jul-10 3:30 
AnswerRe: CreateFile - " file is being used by another process." Pin
Cvaji15-Jul-10 3:29
Cvaji15-Jul-10 3:29 
QuestionGmail in MFC application Pin
Software200715-Jul-10 2:25
Software200715-Jul-10 2:25 
AnswerRe: Gmail in MFC application Pin
Niklas L15-Jul-10 2:36
Niklas L15-Jul-10 2:36 
GeneralRe: Gmail in MFC application Pin
Software200715-Jul-10 2:41
Software200715-Jul-10 2:41 

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.