Click here to Skip to main content
15,901,035 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CEdit::LineLength returning zero Pin
Richard MacCutchan7-Dec-17 22:16
mveRichard MacCutchan7-Dec-17 22:16 
SuggestionRe: CEdit::LineLength returning zero Pin
David Crow7-Dec-17 9:47
David Crow7-Dec-17 9:47 
GeneralRe: CEdit::LineLength returning zero Pin
ForNow7-Dec-17 9:55
ForNow7-Dec-17 9:55 
GeneralRe: CEdit::LineLength returning zero The Answer is CMFCMaskEdit Class Pin
ForNow8-Dec-17 7:48
ForNow8-Dec-17 7:48 
QuestionCalling DLL method from multi-thread Pin
shakumar_215-Dec-17 23:23
shakumar_215-Dec-17 23:23 
QuestionRe: Calling DLL method from multi-thread Pin
Richard MacCutchan5-Dec-17 23:54
mveRichard MacCutchan5-Dec-17 23:54 
AnswerRe: Calling DLL method from multi-thread Pin
Victor Nijegorodov6-Dec-17 8:23
Victor Nijegorodov6-Dec-17 8:23 
QuestionWhy -nan values appear Pin
User 135094504-Dec-17 6:49
professionalUser 135094504-Dec-17 6:49 
AnswerRe: Why -nan values appear Pin
Jochen Arndt4-Dec-17 7:01
professionalJochen Arndt4-Dec-17 7:01 
AnswerRe: Why -nan values appear Pin
k50544-Dec-17 7:05
mvek50544-Dec-17 7:05 
GeneralRe: Why -nan values appear Pin
Peter_in_27805-Dec-17 12:50
professionalPeter_in_27805-Dec-17 12:50 
AnswerRe: Why -nan values appear Pin
David Crow4-Dec-17 8:58
David Crow4-Dec-17 8:58 
AnswerRe: Why -nan values appear Pin
CPallini4-Dec-17 22:26
mveCPallini4-Dec-17 22:26 
QuestionStorage Allocation Pin
ForNow3-Dec-17 6:13
ForNow3-Dec-17 6:13 
AnswerRe: Storage Allocation Pin
CPallini3-Dec-17 9:35
mveCPallini3-Dec-17 9:35 
AnswerRe: Storage Allocation Pin
jschell5-Dec-17 11:51
jschell5-Dec-17 11:51 
GeneralRe: Storage Allocation Pin
ForNow5-Dec-17 12:52
ForNow5-Dec-17 12:52 
GeneralRe: Storage Allocation Pin
jschell8-Dec-17 6:58
jschell8-Dec-17 6:58 
GeneralRe: Storage Allocation Pin
ForNow8-Dec-17 8:08
ForNow8-Dec-17 8:08 
GeneralRe: Storage Allocation Pin
jschell8-Dec-17 13:07
jschell8-Dec-17 13:07 
ForNow wrote:
New works well when you now Exactly howvmuch storage you want I.e a object or class


That is not true.

For an object in C++ you must ALWAYS allocate at least as much space is needed for the object. You can allocate more but it will be wasted.

One can force C++ to use space that is less but that would be nothing but bad programming.

ForNow wrote:
In my case I am capturing user input and not quite sure thus HeapReAlloc


All that means is that you are dynamically allocating the space. Which is something that C++ allows directly. You do not need to use a system API method to do that.

As I previously pointed out HeapReAlloc has a specific purpose. And what you just described here is an inappropriate use of that. And one that could lead to resource (memory) starvation if you are not careful how you use it.
QuestionException in CListBox::Addstring Pin
ForNow1-Dec-17 2:07
ForNow1-Dec-17 2:07 
AnswerRe: Exception in CListBox::Addstring Pin
Jochen Arndt1-Dec-17 2:47
professionalJochen Arndt1-Dec-17 2:47 
GeneralRe: Exception in CListBox::Addstring Pin
ForNow1-Dec-17 2:58
ForNow1-Dec-17 2:58 
GeneralRe: Exception in CListBox::Addstring Pin
Jochen Arndt1-Dec-17 4:18
professionalJochen Arndt1-Dec-17 4:18 
GeneralRe: Exception in CListBox::Addstring Pin
ForNow1-Dec-17 5:04
ForNow1-Dec-17 5:04 

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.