Click here to Skip to main content
15,907,392 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: about Linux Pin
Michael P Butler20-Nov-01 2:54
Michael P Butler20-Nov-01 2:54 
GeneralRe: about Linux Pin
Rassman20-Nov-01 3:29
Rassman20-Nov-01 3:29 
GeneralRe: about Linux Pin
Jason Hihn20-Nov-01 5:30
Jason Hihn20-Nov-01 5:30 
GeneralRe: about Linux Pin
markkuk20-Nov-01 2:44
markkuk20-Nov-01 2:44 
GeneralRe: about Linux Pin
Jason Hihn20-Nov-01 5:50
Jason Hihn20-Nov-01 5:50 
GeneralRe: about Linux Pin
Maer72720-Nov-01 19:59
Maer72720-Nov-01 19:59 
QuestionHow to register a control Pin
20-Nov-01 1:34
suss20-Nov-01 1:34 
QuestionMDI - Is there an other way ?? Pin
Rene D19-Nov-01 23:35
Rene D19-Nov-01 23:35 
Hi all,

Currently I'm working on a program with (at this moment) 100 windows.

In the app of the program I have this code - (x 100).

m_pProg001Template = new CMultiDocTemplate(
     IDR_MENU,
     RUNTIME_CLASS(CDProg001Doc),
     RUNTIME_CLASS(CDProg001Frame),
     RUNTIME_CLASS(CDProg001View));
 AddDocTemplate(m_pProg001Template);

m_pProg002Template = new CMultiDocTemplate(
     IDR_MENU,
     RUNTIME_CLASS(CDProg002Doc),
     RUNTIME_CLASS(CDProg002Frame),
     RUNTIME_CLASS(CDProg002View));
 AddDocTemplate(m_pProg002Template);


etc, etc..


then ..

OnCommand (ID_MENU_001, OnProg001)
OnCommand (ID_MENU_002, OnProg002)


(x 100) etc, etc..

App::OnProg001()                     (x 100)
{
    m_pProg001Template->OpenDocumentFile(NULL, TRUE);
}


etc, etc ..


This doesn't look good, and gives a lot of code in the app.
I have the feeling that there is a easier way to do this,
maybe with 5 lines of codeBig Grin | :-D , but I have no idea how to do this.


Anybody??

Greetings

Rene
AnswerRe: MDI - Is there an other way ?? Pin
Rassman20-Nov-01 2:13
Rassman20-Nov-01 2:13 
AnswerRe: MDI - Is there an other way ?? Pin
Roger Allen20-Nov-01 2:27
Roger Allen20-Nov-01 2:27 
GeneralMoving Child Windows Pin
19-Nov-01 22:54
suss19-Nov-01 22:54 
GeneralRe: Moving Child Windows Pin
19-Nov-01 23:17
suss19-Nov-01 23:17 
GeneralAnimation in VC Pin
19-Nov-01 22:37
suss19-Nov-01 22:37 
GeneralRe: Animation in VC Pin
Rui Lopes20-Nov-01 7:05
Rui Lopes20-Nov-01 7:05 
GeneralScrolling A Device Context Bigger Than Screen Pin
AJ12319-Nov-01 22:03
AJ12319-Nov-01 22:03 
GeneralRe: Scrolling A Device Context Bigger Than Screen Pin
Simon Walton20-Nov-01 7:28
Simon Walton20-Nov-01 7:28 
GeneralUpgrade from MS C V7.0 to VC++ 6.0 Pin
Jerome Conus19-Nov-01 21:53
Jerome Conus19-Nov-01 21:53 
GeneralRe: Upgrade from MS C V7.0 to VC++ 6.0 Pin
Michael P Butler19-Nov-01 22:04
Michael P Butler19-Nov-01 22:04 
GeneralRe: Upgrade from MS C V7.0 to VC++ 6.0 Pin
Jerome Conus19-Nov-01 22:14
Jerome Conus19-Nov-01 22:14 
GeneralRe: Upgrade from MS C V7.0 to VC++ 6.0 Pin
Claudius Mokler19-Nov-01 22:46
Claudius Mokler19-Nov-01 22:46 
GeneralRe: Upgrade from MS C V7.0 to VC++ 6.0 Pin
Rassman20-Nov-01 3:08
Rassman20-Nov-01 3:08 
GeneralRe: Upgrade from MS C V7.0 to VC++ 6.0 Pin
Jerome Conus20-Nov-01 3:30
Jerome Conus20-Nov-01 3:30 
GeneralRe: Upgrade from MS C V7.0 to VC++ 6.0 Pin
20-Nov-01 4:06
suss20-Nov-01 4:06 
GeneralChild Dialog Box Pin
mvworld19-Nov-01 21:45
mvworld19-Nov-01 21:45 
GeneralRe: Child Dialog Box Pin
Christian Graus20-Nov-01 10:22
protectorChristian Graus20-Nov-01 10: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.