Click here to Skip to main content
15,894,460 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to realize a textbox in client area? Pin
xyhan1-Mar-06 7:10
xyhan1-Mar-06 7:10 
QuestionRe: How to realize a textbox in client area? Pin
David Crow1-Mar-06 9:09
David Crow1-Mar-06 9:09 
AnswerRe: How to realize a textbox in client area? Pin
xyhan1-Mar-06 9:55
xyhan1-Mar-06 9:55 
QuestionRe: How to realize a textbox in client area? Pin
David Crow1-Mar-06 10:30
David Crow1-Mar-06 10:30 
AnswerRe: How to realize a textbox in client area? Pin
xyhan1-Mar-06 10:46
xyhan1-Mar-06 10:46 
GeneralRe: How to realize a textbox in client area? Pin
David Crow1-Mar-06 10:55
David Crow1-Mar-06 10:55 
GeneralRe: How to realize a textbox in client area? Pin
xyhan1-Mar-06 12:20
xyhan1-Mar-06 12:20 
GeneralRe: How to realize a textbox in client area? Pin
David Crow2-Mar-06 3:15
David Crow2-Mar-06 3:15 
AnswerRe: How to realize a textbox in client area? Pin
Nish Nishant1-Mar-06 11:19
sitebuilderNish Nishant1-Mar-06 11:19 
QuestionEOF for cygwin executable? Pin
9ine1-Mar-06 6:00
9ine1-Mar-06 6:00 
AnswerRe: EOF for cygwin executable? Pin
Dan McCormick1-Mar-06 7:32
Dan McCormick1-Mar-06 7:32 
GeneralRe: EOF for cygwin executable? Pin
9ine1-Mar-06 22:18
9ine1-Mar-06 22:18 
GeneralRe: EOF for cygwin executable? Pin
Dan McCormick2-Mar-06 1:33
Dan McCormick2-Mar-06 1:33 
GeneralRe: EOF for cygwin executable? Pin
9ine2-Mar-06 5:02
9ine2-Mar-06 5:02 
AnswerRe: EOF for cygwin executable? Pin
Ryan Binns1-Mar-06 17:19
Ryan Binns1-Mar-06 17:19 
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 

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.