Click here to Skip to main content
15,886,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: EOF for cygwin executable? Pin
9ine1-Mar-06 22:15
9ine1-Mar-06 22:15 
GeneralRe: EOF for cygwin executable? Pin
Ryan Binns1-Mar-06 22:50
Ryan Binns1-Mar-06 22:50 
GeneralRe: EOF for cygwin executable? Pin
9ine1-Mar-06 23:38
9ine1-Mar-06 23:38 
QuestioncFile assert Pin
act_x1-Mar-06 5:58
act_x1-Mar-06 5:58 
AnswerRe: cFile assert Pin
David Crow1-Mar-06 6:58
David Crow1-Mar-06 6:58 
AnswerRe: cFile assert Pin
Joe Woodbury1-Mar-06 10:45
professionalJoe Woodbury1-Mar-06 10:45 
QuestionInitializing IXMLDOMTextPtr Pin
hanno251-Mar-06 5:26
hanno251-Mar-06 5:26 
QuestionMultiDocTemplate initialization question Pin
camoguard1-Mar-06 5:00
camoguard1-Mar-06 5:00 
I'm looking for some clarity here. I register two MultiDocTemplates. The only important difference between the two templates is different views.

I don't want the initial dialog that asks me to pick a template before the main window is displayed. I have an initial view already set to run.

Here's some code from my InitInstance()

// InitInstance()
m_pDocTemplate = new CMultiDocTemplate(
IDR_2DVIEW,
RUNTIME_CLASS(CCdataMFCdisplayDoc),
RUNTIME_CLASS(CChildFrame),
RUNTIME_CLASS(C2DView));
AddDocTemplate(m_pDocTemplate);

m_pDocTemplate = new CMultiDocTemplate(
IDR_OPENGL_VIEW,
RUNTIME_CLASS(CCdataMFCdisplayDoc),
RUNTIME_CLASS(CChildFrame),
RUNTIME_CLASS(COpenGLView));
AddDocTemplate(m_pDocTemplate);

// create main MDI Frame window
CMainFrame* pMainFrame = new CMainFrame;
if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
return FALSE;
m_pMainWnd = pMainFrame;

// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);

// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;

// The main window has been initialized, so show and update it.
pMainFrame->ShowWindow(m_nCmdShow);
pMainFrame->UpdateWindow();

// Make a starter document
NewDocument();

// Create a default View

CChildFrame *pFrame = new CChildFrame();

CCreateContext context;
CCdataMFCdisplayView *pview = NULL;

context.m_pCurrentDoc = theApp.GetDocument();
context.m_pNewViewClass = RUNTIME_CLASS(C2DView);
context.m_pNewDocTemplate = theApp.m_pDocTemplate;
context.m_pLastView = NULL;
context.m_pCurrentFrame = ((CMainFrame*)AfxGetMainWnd())->GetActiveFrame();
if (pFrame->LoadFrame(IDR_2DVIEW,WS_CHILD | WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE | WS_VISIBLE, theApp.m_pMainWnd, &context))
pFrame->InitialUpdateFrame((CMyDoc*)theApp.GetDocument(),TRUE);

// nothing pertinent follows
AnswerRe: MultiDocTemplate initialization question Pin
camoguard1-Mar-06 5:31
camoguard1-Mar-06 5:31 
QuestionHowto make a system modal application Pin
whatever891-Mar-06 4:46
whatever891-Mar-06 4:46 
AnswerRe: Howto make a system modal application Pin
David Crow1-Mar-06 5:32
David Crow1-Mar-06 5:32 
QuestionHow show a Bitmap Pin
Alfius791-Mar-06 4:20
Alfius791-Mar-06 4:20 
AnswerRe: How show a Bitmap Pin
Hamid_RT1-Mar-06 4:25
Hamid_RT1-Mar-06 4:25 
GeneralRe: How show a Bitmap Pin
Alfius791-Mar-06 4:30
Alfius791-Mar-06 4:30 
QuestionRe: How show a Bitmap Pin
David Crow1-Mar-06 4:27
David Crow1-Mar-06 4:27 
AnswerRe: How show a Bitmap Pin
Alfius791-Mar-06 21:05
Alfius791-Mar-06 21:05 
GeneralRe: How show a Bitmap Pin
David Crow2-Mar-06 3:09
David Crow2-Mar-06 3:09 
GeneralRe: How show a Bitmap Pin
Alfius792-Mar-06 5:06
Alfius792-Mar-06 5:06 
Questionmix code Vc++ Pin
_tasleem1-Mar-06 4:07
_tasleem1-Mar-06 4:07 
QuestionTypecast _bstr_t to int? Pin
hanno251-Mar-06 3:53
hanno251-Mar-06 3:53 
QuestionRe: Typecast _bstr_t to int? Pin
David Crow1-Mar-06 4:01
David Crow1-Mar-06 4:01 
AnswerRe: Typecast _bstr_t to int? Pin
walter761-Mar-06 4:29
walter761-Mar-06 4:29 
GeneralRe: Typecast _bstr_t to int? Pin
hanno251-Mar-06 5:23
hanno251-Mar-06 5:23 
Questionwhat is IDR_MAINFRAME? Pin
derek71-Mar-06 3:33
derek71-Mar-06 3:33 
QuestionRe: what is IDR_MAINFRAME? Pin
David Crow1-Mar-06 3:34
David Crow1-Mar-06 3:34 

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.