Click here to Skip to main content
16,005,120 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Why doesen't my window show when using CreateDialog()? Pin
Ravi Bhavnani30-Apr-02 9:22
professionalRavi Bhavnani30-Apr-02 9:22 
GeneralRe: Why doesen't my window show when using CreateDialog()? Pin
30-Apr-02 9:34
suss30-Apr-02 9:34 
GeneralRe: Why doesen't my window show when using CreateDialog()? Pin
Chris Losinger30-Apr-02 10:47
professionalChris Losinger30-Apr-02 10:47 
GeneralRe: Why doesen't my window show when using CreateDialog()? Pin
Philippe Mori30-Apr-02 12:51
Philippe Mori30-Apr-02 12:51 
GeneralRe: Why doesen't my window show when using CreateDialog()? Pin
1-May-02 2:20
suss1-May-02 2:20 
GeneralClass Destruct Pin
Peter Liddle30-Apr-02 8:18
Peter Liddle30-Apr-02 8:18 
GeneralRe: Class Destruct Pin
Chris Losinger30-Apr-02 8:28
professionalChris Losinger30-Apr-02 8:28 
GeneralRe: Class Destruct Pin
Ravi Bhavnani30-Apr-02 8:42
professionalRavi Bhavnani30-Apr-02 8:42 
If you store a pointer to class A as member variable in class B, and class B is designed to delete the A object in its own destructor, you should reset the pointer to NULL when you manually delete object A. This will make it clear:
B:: ~B()
{
  // Free A
  if (m_ptrA != NULL) {
     delete m_ptrA;
  }
}
 
B::someFunction()
{
  m_ptrA = new A();
  ...;
  delete m_ptrA;
  m_ptrA = NULL;      // <--- Reset pointer after deleting object
}
/ravi

"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
GeneralRe: Class Destruct Pin
Mike Nordell1-May-02 8:44
Mike Nordell1-May-02 8:44 
GeneralRefresh ListBox Pin
Anton A. Loukine30-Apr-02 8:13
Anton A. Loukine30-Apr-02 8:13 
GeneralRe: Refresh ListBox Pin
Tom Archer30-Apr-02 8:33
Tom Archer30-Apr-02 8:33 
GeneralRe: Refresh ListBox Pin
Ravi Bhavnani30-Apr-02 9:03
professionalRavi Bhavnani30-Apr-02 9:03 
GeneralRe: Refresh ListBox Pin
30-Apr-02 9:52
suss30-Apr-02 9:52 
GeneralRe: Refresh ListBox Pin
Ravi Bhavnani30-Apr-02 9:56
professionalRavi Bhavnani30-Apr-02 9:56 
GeneralMy mistake Pin
Ravi Bhavnani30-Apr-02 9:57
professionalRavi Bhavnani30-Apr-02 9:57 
GeneralRe: My mistake Pin
1-May-02 8:07
suss1-May-02 8:07 
GeneralMDIFrame Pin
act_x30-Apr-02 6:53
act_x30-Apr-02 6:53 
GeneralRe: MDIFrame Pin
30-Apr-02 7:14
suss30-Apr-02 7:14 
GeneralRe: MDIFrame Pin
Tom Archer30-Apr-02 7:33
Tom Archer30-Apr-02 7:33 
QuestionHow do i use a Resource for my main window? Pin
30-Apr-02 6:36
suss30-Apr-02 6:36 
Questionis this wright? Pin
30-Apr-02 6:31
suss30-Apr-02 6:31 
AnswerRe: is this wright? Pin
Tim Smith30-Apr-02 6:37
Tim Smith30-Apr-02 6:37 
AnswerRe: is this wright? Pin
30-Apr-02 6:43
suss30-Apr-02 6:43 
GeneralRe: is this wright? Pin
Ravi Bhavnani30-Apr-02 9:04
professionalRavi Bhavnani30-Apr-02 9:04 
AnswerRe: is this wright? Pin
Philippe Mori30-Apr-02 13:11
Philippe Mori30-Apr-02 13:11 

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.