Click here to Skip to main content
15,902,492 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: A pointer to a closed window Pin
Nitron10-Nov-03 8:04
Nitron10-Nov-03 8:04 
GeneralRe: A pointer to a closed window Pin
Shay Harel10-Nov-03 8:07
Shay Harel10-Nov-03 8:07 
GeneralRe: A pointer to a closed window Pin
David Crow10-Nov-03 9:12
David Crow10-Nov-03 9:12 
GeneralRe: A pointer to a closed window Pin
Shay Harel10-Nov-03 9:26
Shay Harel10-Nov-03 9:26 
GeneralRe: A pointer to a closed window Pin
Shay Harel10-Nov-03 9:43
Shay Harel10-Nov-03 9:43 
GeneralRe: A pointer to a closed window Pin
David Crow10-Nov-03 8:58
David Crow10-Nov-03 8:58 
GeneralRe: A pointer to a closed window Pin
Shay Harel10-Nov-03 9:04
Shay Harel10-Nov-03 9:04 
GeneralRe: A pointer to a closed window Pin
Antti Keskinen11-Nov-03 0:43
Antti Keskinen11-Nov-03 0:43 
I take it you have a derived CWnd or CSplitterWnd class you are using. How about overriding the default handlers so, that each of them sets a boolean before calling the base class ?
<span style='cpp-keyword'>class</span> CMyDerivedWnd : <span style='cpp-keyword'>public</span> CWnd
{
    ...
    RESULT Create(PARAMS) 
    { 
        <span style='cpp-keyword'>this</span>->bIsCreated = TRUE; 

        <span style='cpp-keyword'>return</span> CWnd::Create(PARAMS);
    }
    ...

<span style='cpp-keyword'>private</span>:
    BOOL bIsCreated;
    BOOL bIsOpen;
    BOOL bIsDestroyed;
}

This, of course, assumes that you've marked the base class as virtual. I am unsure whether the original Create functions are virtual in the CWnd class (why wouldn't they be ? Ask MS)..

-Antti Keskinen


----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
GeneralRe: A pointer to a closed window Pin
Shay Harel11-Nov-03 3:21
Shay Harel11-Nov-03 3:21 
QuestionHow to use a region Pin
Eugene Pustovoyt10-Nov-03 7:29
Eugene Pustovoyt10-Nov-03 7:29 
AnswerRe: How to use a region Pin
JWood10-Nov-03 16:01
JWood10-Nov-03 16:01 
Generalusing messagebox.... Pin
Member 210374010-Nov-03 7:05
Member 210374010-Nov-03 7:05 
GeneralRe: using messagebox.... Pin
jmkhael10-Nov-03 7:14
jmkhael10-Nov-03 7:14 
GeneralRe: using messagebox.... Pin
ricolee0310-Nov-03 7:18
ricolee0310-Nov-03 7:18 
GeneralRe: using messagebox.... Pin
jmkhael10-Nov-03 7:23
jmkhael10-Nov-03 7:23 
GeneralRe: using messagebox.... Pin
ricolee0010-Nov-03 7:32
ricolee0010-Nov-03 7:32 
GeneralRe: using messagebox.... Pin
jmkhael10-Nov-03 7:34
jmkhael10-Nov-03 7:34 
GeneralRe: using messagebox.... Pin
ricolee0010-Nov-03 7:38
ricolee0010-Nov-03 7:38 
GeneralRe: using messagebox.... Pin
Shay Harel10-Nov-03 8:15
Shay Harel10-Nov-03 8:15 
GeneralRe: using messagebox.... Pin
David Crow10-Nov-03 9:06
David Crow10-Nov-03 9:06 
GeneralRe: using messagebox.... Pin
ricolee0010-Nov-03 10:01
ricolee0010-Nov-03 10:01 
Generalmissing menu on windows 98 Pin
Anonymous10-Nov-03 6:29
Anonymous10-Nov-03 6:29 
GeneralRe: missing menu on windows 98 Pin
David Crow10-Nov-03 6:59
David Crow10-Nov-03 6:59 
GeneralRe: missing menu on windows 98 Pin
Roger Allen11-Nov-03 0:47
Roger Allen11-Nov-03 0:47 
GeneralRe: missing menu on windows 98 Pin
Anonymous12-Nov-03 7:22
Anonymous12-Nov-03 7:22 

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.