Click here to Skip to main content
15,886,963 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Reading the Edit properties from different applications Pin
Vissu8929-Aug-06 18:08
Vissu8929-Aug-06 18:08 
GeneralRe: Reading the Edit properties from different applications Pin
Naveen29-Aug-06 18:37
Naveen29-Aug-06 18:37 
GeneralRe: Reading the Edit properties from different applications Pin
Vissu8929-Aug-06 19:29
Vissu8929-Aug-06 19:29 
GeneralRe: Reading the Edit properties from different applications Pin
Naveen29-Aug-06 19:47
Naveen29-Aug-06 19:47 
GeneralRe: Reading the Edit properties from different applications Pin
David Crow30-Aug-06 3:44
David Crow30-Aug-06 3:44 
GeneralRe: Reading the Edit properties from different applications Pin
Hamid_RT31-Aug-06 6:00
Hamid_RT31-Aug-06 6:00 
Questionlarge buffers Pin
thathvamsi29-Aug-06 16:42
thathvamsi29-Aug-06 16:42 
AnswerRe: large buffers Pin
Steve S29-Aug-06 21:56
Steve S29-Aug-06 21:56 
thathvamsi wrote:
but if i create the reformat buffer as such, i need to delete it as well but i need to pass this buffer on to projview.cpp file, then how will i do it? where will i delete it?


Firstly, if your buffer needs to be 3000000 bytes long, then you need

unsigned char* buf = new unsigned char[3000000]

otherwise you're overallocating by a factor of 4.

Secondly, passing the buffer around should be no problem, since you just need the address (and possibly a size, to help detect/prevent underrun/overrun).

From your post, you need two buffers; the first is used by the thread reading the data. Does this thread also perform the reformat? Can the reformat be done 'in place' or do you need a separate buffer?

Only you know when to delete the buffer - when you're done with it. However, don't keep deleting and reallocating it, since they are potentially expensive (and fragmenting) operations.


Steve S
Developer for hire

QuestionCDhtmlDialog - IHtmlElementCollection [modified] Pin
Christopher Duncan29-Aug-06 16:20
Christopher Duncan29-Aug-06 16:20 
AnswerRe: CDhtmlDialog Pin
Mircea Puiu29-Aug-06 20:24
Mircea Puiu29-Aug-06 20:24 
GeneralRe: CDhtmlDialog Pin
Christopher Duncan30-Aug-06 1:42
Christopher Duncan30-Aug-06 1:42 
GeneralRe: CDhtmlDialog Pin
Mircea Puiu30-Aug-06 2:57
Mircea Puiu30-Aug-06 2:57 
GeneralRe: CDhtmlDialog Pin
Christopher Duncan30-Aug-06 3:09
Christopher Duncan30-Aug-06 3:09 
GeneralRe: CDhtmlDialog Pin
Mircea Puiu30-Aug-06 7:09
Mircea Puiu30-Aug-06 7:09 
GeneralRe: CDhtmlDialog Pin
Christopher Duncan30-Aug-06 7:15
Christopher Duncan30-Aug-06 7:15 
GeneralRe: CDhtmlDialog Pin
Mircea Puiu30-Aug-06 7:27
Mircea Puiu30-Aug-06 7:27 
AnswerRe: CDhtmlDialog - IHtmlElementCollection Pin
Hamid_RT31-Aug-06 6:02
Hamid_RT31-Aug-06 6:02 
GeneralRe: CDhtmlDialog - IHtmlElementCollection Pin
Christopher Duncan31-Aug-06 6:10
Christopher Duncan31-Aug-06 6:10 
GeneralRe: CDhtmlDialog - IHtmlElementCollection Pin
Hamid_RT31-Aug-06 9:43
Hamid_RT31-Aug-06 9:43 
QuestionButton disappears after OnPaint() Pin
mfranco_neto29-Aug-06 16:08
mfranco_neto29-Aug-06 16:08 
AnswerRe: Button disappears after OnPaint() Pin
Nishad S29-Aug-06 18:39
Nishad S29-Aug-06 18:39 
GeneralRe: Button disappears after OnPaint() Pin
mfranco_neto30-Aug-06 12:04
mfranco_neto30-Aug-06 12:04 
GeneralRe: Button disappears after OnPaint() Pin
Nishad S30-Aug-06 17:33
Nishad S30-Aug-06 17:33 
GeneralRe: Button disappears after OnPaint() Pin
mfranco_neto31-Aug-06 2:53
mfranco_neto31-Aug-06 2:53 
GeneralRe: Button disappears after OnPaint() Pin
Nishad S31-Aug-06 3:33
Nishad S31-Aug-06 3:33 

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.