Click here to Skip to main content
15,923,845 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralButtons in a CListCtrl Pin
MightyThor12-Sep-02 6:51
MightyThor12-Sep-02 6:51 
GeneralRe: Buttons in a CListCtrl Pin
Tomasz Sowinski12-Sep-02 7:44
Tomasz Sowinski12-Sep-02 7:44 
GeneralRe: Buttons in a CListCtrl Pin
MightyThor12-Sep-02 8:19
MightyThor12-Sep-02 8:19 
GeneralRe: Buttons in a CListCtrl Pin
Tomasz Sowinski12-Sep-02 8:24
Tomasz Sowinski12-Sep-02 8:24 
GeneralRe: Buttons in a CListCtrl Pin
MightyThor12-Sep-02 9:06
MightyThor12-Sep-02 9:06 
Generalmini window Pin
Zizilamoroso12-Sep-02 6:25
Zizilamoroso12-Sep-02 6:25 
GeneralRe: mini window Pin
Zizilamoroso12-Sep-02 6:27
Zizilamoroso12-Sep-02 6:27 
Generalfinally dealing with 'new' Pin
ns12-Sep-02 6:19
ns12-Sep-02 6:19 
Okay. I n many places I have stuff like:

m_FieldHolder = new CString [m_numFields ];


if the m_FieldHolder comes back as null, I will surely crash. This is in a function of a class, lets say. SO I of course can say:

if( m_FieldHolder)
{...
}

but what if its coming back as NULL? I will surely crash if I skip the code its supposed to do when not NULL. SO at this point, from the function in my class, how do I handle things? It would be nice to call a common global function each time new failed, but then do I exit? If I dont I cant predict what would happen since I have a zillion new, but in no case have I dealt with if its NULL then do what? I suppose I could pass info into my global NewFAilure() that would tell it which new it was that failed.

Ideas?
Thanks,
ns
GeneralRe: finally dealing with 'new' Pin
Chris Losinger12-Sep-02 6:24
professionalChris Losinger12-Sep-02 6:24 
GeneralRe: finally dealing with 'new' Pin
Le centriste12-Sep-02 7:43
Le centriste12-Sep-02 7:43 
GeneralRe: finally dealing with 'new' Pin
Ravi Bhavnani12-Sep-02 10:32
professionalRavi Bhavnani12-Sep-02 10:32 
GeneralRe: finally dealing with 'new' Pin
Michael Dunn12-Sep-02 18:29
sitebuilderMichael Dunn12-Sep-02 18:29 
GeneralRe: finally dealing with 'new' Pin
ns17-Sep-02 3:19
ns17-Sep-02 3:19 
GeneralRe: finally dealing with 'new' Pin
Michael Dunn17-Sep-02 5:27
sitebuilderMichael Dunn17-Sep-02 5:27 
QuestionHow to insert a number of Icons into a project? Pin
chen12-Sep-02 5:47
chen12-Sep-02 5:47 
GeneralVisio 2000 Style Dockable windows Pin
Yaeli12-Sep-02 5:27
Yaeli12-Sep-02 5:27 
GeneralRe: Visio 2000 Style Dockable windows Pin
Anonymous12-Sep-02 5:44
Anonymous12-Sep-02 5:44 
GeneralStatistics Package Pin
David Day12-Sep-02 5:18
David Day12-Sep-02 5:18 
QuestionCan someone crack this problem? I can't... Pin
Tommy Svensson12-Sep-02 4:58
Tommy Svensson12-Sep-02 4:58 
AnswerRe: Can someone crack this problem? I can't... Pin
benjymous12-Sep-02 5:24
benjymous12-Sep-02 5:24 
AnswerRe: Can someone crack this problem? I can't... Pin
Andreas Saurwein12-Sep-02 5:57
Andreas Saurwein12-Sep-02 5:57 
QuestionMAX_PATH defined as? Pin
ns12-Sep-02 5:01
ns12-Sep-02 5:01 
AnswerRe: MAX_PATH defined as? Pin
Chris Losinger12-Sep-02 5:04
professionalChris Losinger12-Sep-02 5:04 
GeneralRe: MAX_PATH defined as? Pin
ns12-Sep-02 5:19
ns12-Sep-02 5:19 
GeneralRe: MAX_PATH defined as? Pin
Chris Losinger12-Sep-02 5:20
professionalChris Losinger12-Sep-02 5:20 

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.