Click here to Skip to main content
16,008,010 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: failed to create empty document!!! Pin
ns26-Jul-02 8:58
ns26-Jul-02 8:58 
GeneralThanks!!! Pin
ns26-Jul-02 9:06
ns26-Jul-02 9:06 
GeneralRe: Thanks!!! Pin
Anonymous26-Jul-02 9:48
Anonymous26-Jul-02 9:48 
GeneralProblem Pin
Kashif Gulzar26-Jul-02 8:19
Kashif Gulzar26-Jul-02 8:19 
GeneralRe: Problem Pin
lucy26-Jul-02 9:24
lucy26-Jul-02 9:24 
GeneralRe: Problem Pin
Ken Mazaika26-Jul-02 18:18
Ken Mazaika26-Jul-02 18:18 
Generalm_bAutoDelete and doc class Pin
nss26-Jul-02 8:09
nss26-Jul-02 8:09 
GeneralRe: m_bAutoDelete and doc class Pin
perlmunger26-Jul-02 18:58
perlmunger26-Jul-02 18:58 
To be honest with you, your question is a little vague, however, I think I've found the answer you're looking for.

An auto delete member variable is a fairly common thing and could be anywhere. However, I do believe what you are looking for is m_bAutoDelete and not mb_autoDelete. It would help to learn the notation used by Microsoft. In this case m_ means member variable and b means boolean. So the correct variable name is m_bAutoDelete. If you do a search in the MSDN library with your Visual Studio install for this variable name, you'll see that the variable you are looking for is in fact in the CDocument as you suspected.

This particular member variable tells MFC not to delete the document when the view is destroyed if you set it to FALSE.

Here's some code from the MSDN library used in a replace view method:
CDocument* pDoc = pView->GetDocument();
BOOL bSaveAutoDelete = pDoc->m_bAutoDelete;
pDoc->m_bAutoDelete = FALSE;
pFrame->SetActiveView(NULL); // it's safer


Good luck.

-Matt

------------------------------------------

The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
GeneralRe: m_bAutoDelete and doc class Pin
nss26-Jul-02 19:59
nss26-Jul-02 19:59 
GeneralNewbie: Referencing several controls Pin
26-Jul-02 7:37
suss26-Jul-02 7:37 
GeneralRe: Newbie: Referencing several controls Pin
Chris Losinger26-Jul-02 8:04
professionalChris Losinger26-Jul-02 8:04 
GeneralRe: Newbie: Referencing several controls Pin
26-Jul-02 8:45
suss26-Jul-02 8:45 
GeneralRe: Newbie: Referencing several controls Pin
Joel Lucsy26-Jul-02 18:24
Joel Lucsy26-Jul-02 18:24 
Generalpopulating a multiline edit, or Crichedit Pin
nss26-Jul-02 7:28
nss26-Jul-02 7:28 
GeneralRe: populating a multiline edit, or Crichedit Pin
nss26-Jul-02 7:51
nss26-Jul-02 7:51 
GeneralInset Dialog Tab Order Pin
Dov Sherman26-Jul-02 7:14
Dov Sherman26-Jul-02 7:14 
GeneralRe: Inset Dialog Tab Order Pin
Ernest Laurentin27-Jul-02 12:39
Ernest Laurentin27-Jul-02 12:39 
Questionhow to pass in an index when LButtondown handler runs? Pin
nss26-Jul-02 6:02
nss26-Jul-02 6:02 
AnswerRe: how to pass in an index when LButtondown handler runs? Pin
perlmunger26-Jul-02 19:20
perlmunger26-Jul-02 19:20 
QuestionCreatePrinterDC fails? Pin
-Dy26-Jul-02 5:38
-Dy26-Jul-02 5:38 
GeneralCRecttraker with CScrollview Pin
g-sus26-Jul-02 5:19
g-sus26-Jul-02 5:19 
GeneralMy CListCtrl & Ownerdata Pin
26-Jul-02 5:16
suss26-Jul-02 5:16 
Generaldoes the forum belong to ... Pin
includeh1026-Jul-02 4:33
includeh1026-Jul-02 4:33 
GeneralRe: does the forum belong to ... Pin
benjymous26-Jul-02 5:25
benjymous26-Jul-02 5:25 
GeneralRe: does the forum belong to ... Pin
Alexandru Savescu26-Jul-02 10:52
Alexandru Savescu26-Jul-02 10:52 

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.