 |
|
 |
how to add a close button to each tab?
|
|
|
|
 |
|
 |
:-DSir,
Could u pls help in understanding the communication between CFrameWnd and CView?
ie; i want to access a member funtion of view from frame or viceversa?
thanking u
Satishvarma.E
Belive in yourself that you can do Anything and
Every thing
Satishvarma.E
|
|
|
|
 |
|
 |
Hi, I use PropertyPage instead of TabControl.
I tried to create the View in my PropertyPage, and could you take a look at the following code and give me some intructions?
void CMyPropertyPage6::FranViewSquare()
{
CRect SquareRect;
GetClientRect(&SquareRect);
int rightt=SquareRect.right;
int topp=SquareRect.top;
// according to the top-right corner
SquareRect.SetRect(rightt-110,rightt-10,topp+10,topp+100);
CFranView* m_pFranView;
m_pFranView=new CFranView();
m_pFranView->Creat(NULL,NULL,WS_VISIBLE|WS_CHILD,SquareRect,&CMyPropertyPage6,WM_USER+1);
}
The problem happends in "Create()". I have no idea how to set the 5th item.
Once this problems solved, will I suceed in creating the View in the PropertyPage?
bonmeepon means pupcorn
|
|
|
|
 |
|
 |
I think if you are not going to use Doc/View frame, why not use CWnd directly. I think using CWnd can achieve the same functionalities, too.
Of course, this is is good article to indroduce some knowledge About CView.
Magic
|
|
|
|
 |
|
 |
Hi all,
I am using SDI with Single document and multiple views
how can I use jpeg as background in all views, or is there any alernative of this.
Thanks and Regards
Sunil Joshi
|
|
|
|
 |
|
|
 |
|
 |
Would someone whose native tongue is English please define / redefine "multiple view"!
I am under the impression that multiple view is a rendering of SAME information (document) in a DIFFERENT visual form.
For example - I have a signal - plain old audio - and want to see it in buff, raw - I think the scientific term is "time domain". Than I want to see the frequencies in this signal - view it in "frequency domain". This is what I call multiple views.
Am I wrong?
On the surface ( I have not disected this code - I admit that) this and many other articles describe DIFFERENT document ( subject) in different windows.
Any example why would one need a computer program to do this? It seems that the only purpose of application like this is to draw / display in one window.
In that case, I agree - doc/view approach is not needed.
Vaclav
|
|
|
|
 |
|
 |
He means Multiple views as in multiple classes derived from Cview. So for example,if you want to have two diffrent window types open at once, a dialog and opengl window open up you have to add some special code. I just wrote a tut on this but I do it in a way I belive to be better and less of a hack. Check the new tuts in doc /view section.
You only need this if you need totally diffrent windows, for example a viewer and a log window.
|
|
|
|
 |
|
 |
Hi, how i can add scrollview? i obtain debug assertion failure.
Regards
Francisco Morosini
|
|
|
|
 |
|
 |
scrollview on an opengl window? you would have to write that code yourself. Check my tut on getting multiple doc /views.
|
|
|
|
 |
|
 |
Great tutorial...Just what I needed...Keep up the good work
Thanx
|
|
|
|
 |
|
 |
Hi, Pedro Jorquera, Toni Barella!
Thanks for sharing with us the source codes and the concept.
It's a great idea to create a view on the fly.
I wonder whether it is possible to create a view on the fly within
a MDI or SDI application. This view could be attached to a document
or not.
Below are my test codes. But the view fail to show up.
void CDemoDoc::OnViewFormview()
{
// TODO: Add your command handler code here
CMDIFrameWnd *pMainWnd = (CMDIFrameWnd*)AfxGetMainWnd();
// Get the active MDI child window.
CMDIChildWnd* pChild = (CMDIChildWnd*)pMainWnd->MDIGetActive ();
CRuntimeClass *pNewViewClass = RUNTIME_CLASS(CMyView);
CView* pNewView = (CView*)pNewViewClass->CreateObject();
if(pNewView == NULL)
{
TRACE("Warning: Dynamic create of view type %Fs failed\n",
pNewViewClass->m_lpszClassName);
return;
}
// Draw new view.
CCreateContext context;
context.m_pNewViewClass = pNewViewClass;
context.m_pCurrentDoc = NULL;
context.m_pNewDocTemplate = NULL; // This view is not attached to any document
//context.m_pNewDocTemplate = This; // This view is not attached to current document
context.m_pLastView = NULL;
context.m_pCurrentFrame = pChild;
if(!pNewView->Create (NULL,NULL,AFX_WS_DEFAULT_VIEW, CRect(0,0,0,0),
pChild,AFX_IDW_PANE_FIRST+1, &context))
{
TRACE("Warning: couldn't create view for frame\n");
delete pNewView;
return;
}
pNewView->SendMessage (WM_INITIALUPDATE, 0, 0); // WM_INITIALUPDATE is defined in afxpriv.h
pChild->RecalcLayout ();
pNewView->UpdateWindow ();
pChild->SetActiveView (pNewView);
}
Any comments or suggestion are greatly appreciated!
Wayne King
09 Nov 2001
|
|
|
|
 |