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

C / C++ / MFC

 
GeneralNaming child windows Pin
12-Jul-01 5:10
suss12-Jul-01 5:10 
GeneralRe: Naming child windows Pin
Tomasz Sowinski12-Jul-01 7:36
Tomasz Sowinski12-Jul-01 7:36 
GeneralCobol Client using DLL with Dialog Pin
Jim99912-Jul-01 4:28
Jim99912-Jul-01 4:28 
GeneralRe: Cobol Client using DLL with Dialog Pin
Tomasz Sowinski12-Jul-01 7:23
Tomasz Sowinski12-Jul-01 7:23 
GeneralRe: Cobol Client using DLL with Dialog Pin
Jim99916-Jul-01 23:36
Jim99916-Jul-01 23:36 
QuestionHow can I count the number of open document in MDI Pin
mr200312-Jul-01 4:28
mr200312-Jul-01 4:28 
AnswerRe: How can I count the number of open document in MDI Pin
Tomasz Sowinski12-Jul-01 7:30
Tomasz Sowinski12-Jul-01 7:30 
GeneralRe: How can I count the number of open document in MDI Pin
mr200312-Jul-01 8:17
mr200312-Jul-01 8:17 
thanks for your help,
I have a small question. How can I cast the pDoc pointer so I could have access to the data of the corresponding document.

int i=0;
int nDocCount = 0;
CWinApp* pApp = AfxGetApp();
POSITION posTemplate = pApp->GetFirstDocTemplatePosition();
while (posTemplate)
{
CDocTemplate *pDocTemplate=pApp->GetNextDocTemplate(posTemplate);
if(NULL!=pDocTemplate)
{
POSITION posDoc = pDocTemplate->GetFirstDocPosition();
while(posDoc)
{
CDocument *pDoc = pDocTemplate->GetNextDoc(posDoc);
////////////////////////////////////////////////////
//I need another pointer to the data of the corresponding doc, or i have to cast pDoc. How can I do that.
///////////////////////////////

if(NULL!=pDoc)
nDocCount++;
}
}
i++;
}
TRACE("%d",nDocCount);



Thanks


Ehsan Behboudi
GeneralRe: How can I count the number of open document in MDI Pin
Tomasz Sowinski12-Jul-01 8:30
Tomasz Sowinski12-Jul-01 8:30 
GeneralCSplitterWnd Pin
ov12-Jul-01 4:15
ov12-Jul-01 4:15 
GeneralRe: CSplitterWnd Pin
Tomasz Sowinski12-Jul-01 4:21
Tomasz Sowinski12-Jul-01 4:21 
GeneralRe: CSplitterWnd Pin
ov12-Jul-01 4:24
ov12-Jul-01 4:24 
GeneralRe: CSplitterWnd Pin
ov12-Jul-01 4:35
ov12-Jul-01 4:35 
GeneralRe: CSplitterWnd Pin
Tomasz Sowinski12-Jul-01 4:38
Tomasz Sowinski12-Jul-01 4:38 
GeneralRe: CSplitterWnd Pin
ov12-Jul-01 4:40
ov12-Jul-01 4:40 
GeneralRe: CSplitterWnd Pin
Tomasz Sowinski12-Jul-01 7:13
Tomasz Sowinski12-Jul-01 7:13 
GeneralRUN APPLICATION from SCREEN SAVER Pin
12-Jul-01 3:55
suss12-Jul-01 3:55 
GeneralRe: RUN APPLICATION from SCREEN SAVER Pin
Paolo Messina12-Jul-01 10:48
professionalPaolo Messina12-Jul-01 10:48 
GeneralFrame windows Pin
Troels_Gram12-Jul-01 2:21
Troels_Gram12-Jul-01 2:21 
GeneralRe: Frame windows Pin
Tomasz Sowinski12-Jul-01 2:34
Tomasz Sowinski12-Jul-01 2:34 
GeneralCFileFind (Maybe I'll get an answer this time) Pin
Michael Martin12-Jul-01 2:14
professionalMichael Martin12-Jul-01 2:14 
GeneralRe: CFileFind (Maybe I'll get an answer this time) Pin
Tomasz Sowinski12-Jul-01 2:30
Tomasz Sowinski12-Jul-01 2:30 
GeneralRe: CFileFind (Maybe I'll get an answer this time) Pin
Michael Martin12-Jul-01 3:37
professionalMichael Martin12-Jul-01 3:37 
GeneralRe: CFileFind (Maybe I'll get an answer this time) Pin
Tomasz Sowinski12-Jul-01 3:49
Tomasz Sowinski12-Jul-01 3:49 
GeneralRe: CFileFind (Maybe I'll get an answer this time) Pin
Michael Martin12-Jul-01 3:53
professionalMichael Martin12-Jul-01 3:53 

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.