Click here to Skip to main content
15,892,161 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: about event Pin
Christian Graus28-Apr-07 15:20
protectorChristian Graus28-Apr-07 15:20 
GeneralRe: about event Pin
HOW WHAT29-Apr-07 2:42
HOW WHAT29-Apr-07 2:42 
GeneralRe: about event Pin
Joan M28-Apr-07 23:47
professionalJoan M28-Apr-07 23:47 
GeneralRe: about event Pin
HOW WHAT29-Apr-07 2:44
HOW WHAT29-Apr-07 2:44 
GeneralRe: about event Pin
Joan M29-Apr-07 4:53
professionalJoan M29-Apr-07 4:53 
QuestionMemory handling/Bad practice? Pin
alex.barylski28-Apr-07 12:35
alex.barylski28-Apr-07 12:35 
AnswerRe: Memory handling/Bad practice? Pin
cmk28-Apr-07 12:56
cmk28-Apr-07 12:56 
AnswerRe: Memory handling/Bad practice? Pin
John R. Shaw28-Apr-07 14:42
John R. Shaw28-Apr-07 14:42 
Interesting! Yes it would be bad practice to have the object modify the size of a buffer it knows nothing about, but it would also be bad practice not to have the object do its own buffer allocations and releases.

Example: char buffer[128]; setBuffer(buffer, cbSize);

As you can see, I just misused your function.

Unless you have a very good reason not to, then you should use the C++ vector class for your buffers. If your object needs a buffer it should allocate it internally and have control over its life time.


INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra

QuestionAutoProxy detection via script "FindProxyForURL" Pin
Peter Weyzen28-Apr-07 11:50
Peter Weyzen28-Apr-07 11:50 
QuestionMSChart in VC++2005 Pin
hahahua28-Apr-07 10:38
hahahua28-Apr-07 10:38 
AnswerRe: MSChart in VC++2005 Pin
hahahua28-Apr-07 16:57
hahahua28-Apr-07 16:57 
AnswerRe: MSChart in VC++2005 Pin
Joan M28-Apr-07 23:50
professionalJoan M28-Apr-07 23:50 
GeneralRe: MSChart in VC++2005 Pin
hahahua29-Apr-07 8:40
hahahua29-Apr-07 8:40 
GeneralRe: MSChart in VC++2005 Pin
Joan M29-Apr-07 8:46
professionalJoan M29-Apr-07 8:46 
GeneralRe: MSChart in VC++2005 Pin
hahahua30-Apr-07 15:33
hahahua30-Apr-07 15:33 
GeneralRe: MSChart in VC++2005 Pin
Joan M30-Apr-07 22:28
professionalJoan M30-Apr-07 22:28 
Questionhi guys,i'm in a fix and need help Pin
phemmymichael28-Apr-07 9:02
phemmymichael28-Apr-07 9:02 
AnswerRe: hi guys,i'm in a fix and need help Pin
John R. Shaw28-Apr-07 14:52
John R. Shaw28-Apr-07 14:52 
GeneralRe: hi guys,i'm in a fix and need help Pin
Randor 28-Apr-07 21:54
professional Randor 28-Apr-07 21:54 
Questionconversion from wave to mp3 Pin
puneet_cha28-Apr-07 8:55
puneet_cha28-Apr-07 8:55 
AnswerRe: conversion from wave to mp3 Pin
Mark Salsbery29-Apr-07 8:39
Mark Salsbery29-Apr-07 8:39 
QuestionPlaySound VC++ 2003 MFC Pin
YUANGE28-Apr-07 8:45
YUANGE28-Apr-07 8:45 
AnswerRe: PlaySound VC++ 2003 MFC Pin
Hamid_RT28-Apr-07 8:50
Hamid_RT28-Apr-07 8:50 
AnswerRe: PlaySound VC++ 2003 MFC Pin
YUANGE29-Apr-07 1:56
YUANGE29-Apr-07 1:56 
QuestionHooking & modifying WSARec Pin
Dody_DK28-Apr-07 8:12
Dody_DK28-Apr-07 8:12 

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.