Click here to Skip to main content
15,925,133 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Farsi language in VC++ .NET Pin
Mazdak12-Nov-02 4:35
Mazdak12-Nov-02 4:35 
GeneralRe: Farsi language in VC++ .NET Pin
Hadi Rezaee12-Nov-02 5:49
Hadi Rezaee12-Nov-02 5:49 
GeneralCopyImage woes Pin
Jim Crafton11-Nov-02 7:29
Jim Crafton11-Nov-02 7:29 
GeneralRe: CopyImage woes Pin
Christian Graus11-Nov-02 8:37
protectorChristian Graus11-Nov-02 8:37 
GeneralUse a Dialog to another pgm created by another pgm Pin
youssef11-Nov-02 7:00
youssef11-Nov-02 7:00 
GeneralRe: Use a Dialog to another pgm created by another pgm Pin
valikac11-Nov-02 7:48
valikac11-Nov-02 7:48 
GeneralRe: Use a Dialog to another pgm created by another pgm Pin
youssef12-Nov-02 13:37
youssef12-Nov-02 13:37 
GeneralChanging view Pin
act_x11-Nov-02 6:47
act_x11-Nov-02 6:47 
i have an MDI application with 2 views .

Initially in the App class I do the following :

CMultiDocTemplate* pDocTemplate;<br />
	pDocTemplate = new CMultiDocTemplate(<br />
		IDR_MDI2TYPE,<br />
		RUNTIME_CLASS(CMDI2Doc),<br />
		RUNTIME_CLASS(CChildFrame), // custom MDI child frame<br />
		RUNTIME_CLASS(CPersonalityGenerator1View));<br />
	AddDocTemplate(pDocTemplate);<br />
<br />
<br />
	secondTemplate = new CMultiDocTemplate(<br />
		IDR_MDI2TYPE,<br />
		RUNTIME_CLASS(CMDI2Doc),<br />
		RUNTIME_CLASS(CChildFrame), // custom MDI child frame<br />
		RUNTIME_CLASS(View1));

// I DO NOT ADD THIS SECOND TEMPLATE

On a New document I do the following :

if (!CDocument::OnNewDocument())<br />
		return FALSE;<br />
<br />
	CMDI2App *myApp=(CMDI2App *)AfxGetApp();<br />
	CMainFrame *mnd= (CMainFrame *)(myApp->m_pMainWnd);<br />
        CFrameWnd *allotedFrameWnd;<br />
	 allotedFrameWnd=myApp->secondTemplate->CreateNewFrame(this,0);<br />
	 myApp->secondTemplate->InitialUpdateFrame(allotedFrameWnd,this, TRUE);<br />
        allotedFrameWnd->SetActiveWindow();<br />
        allotedFrameWnd->ShowWindow(SW_HIDE);

I am suppressing this second View by hiding it AND i display the first view . This is what i want initially !

Now I need to activate this view on an On Button Event from the Toolbar

In the active View i am trying to do something as :
<br />
        void CFirstView::OnSwitchView()<br />
      {<br />
<br />
	POSITION pos = this->GetDocument()->GetFirstViewPosition();<br />
<br />
	CView *v2 = this->GetDocument()->GetNextView(pos);<br />
<br />
	v2->GetActiveWindow();<br />
	//GetParentFrame()->ActivateFrame();<br />
<br />
        v2->GetParentFrame()->ShowWindow(SW_SHOW);<br />
}

I find that the views are not getting switched . I observe no change . Please help
GeneralApplication Idle Timeout Pin
SchmoBoy11-Nov-02 6:27
SchmoBoy11-Nov-02 6:27 
GeneralRe: Application Idle Timeout Pin
valikac11-Nov-02 7:56
valikac11-Nov-02 7:56 
GeneralInvoking another Application Pin
act_x11-Nov-02 5:51
act_x11-Nov-02 5:51 
GeneralRe: Invoking another Application Pin
Chris Losinger11-Nov-02 5:56
professionalChris Losinger11-Nov-02 5:56 
GeneralRe: Invoking another Application Pin
Scott H. Settlemier11-Nov-02 5:56
Scott H. Settlemier11-Nov-02 5:56 
Generalserial comm. Pin
peter ho11-Nov-02 5:40
peter ho11-Nov-02 5:40 
GeneralRe: serial comm. Pin
Scott H. Settlemier11-Nov-02 5:51
Scott H. Settlemier11-Nov-02 5:51 
GeneralRotarty dial control knob Pin
john john mackey11-Nov-02 5:36
john john mackey11-Nov-02 5:36 
GeneralRe: Rotarty dial control knob Pin
Andreas Saurwein11-Nov-02 5:46
Andreas Saurwein11-Nov-02 5:46 
GeneralRe: Rotarty dial control knob Pin
Anonymous11-Nov-02 5:55
Anonymous11-Nov-02 5:55 
GeneralRe: Rotarty dial control knob Pin
Andreas Saurwein11-Nov-02 6:16
Andreas Saurwein11-Nov-02 6:16 
Generaldoubt about EnumPrinters() Pin
vgkotha11-Nov-02 4:18
vgkotha11-Nov-02 4:18 
GeneralRe: c++ access to a dbase database Pin
Alexandru Savescu11-Nov-02 5:39
Alexandru Savescu11-Nov-02 5:39 
Generalparameter passing in C++ Pin
Jim Crafton11-Nov-02 3:07
Jim Crafton11-Nov-02 3:07 
GeneralRe: parameter passing in C++ Pin
jhwurmbach11-Nov-02 3:11
jhwurmbach11-Nov-02 3:11 
GeneralRe: parameter passing in C++ Pin
Tim Smith11-Nov-02 3:55
Tim Smith11-Nov-02 3:55 
GeneralRe: parameter passing in C++ Pin
Scott H. Settlemier11-Nov-02 4:59
Scott H. Settlemier11-Nov-02 4:59 

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.