suppose i create abc child windows & xyz child windows but it parent is abc xyz look like child of abc plz help me yogesh shrikhande yogesh28577@yahoo.co.in
ReplyOriginally posted by: Martin Chapman
afx_msg void OnFileNew();
Add mesage_macro and implementation to cpp file like:
ON_COMMAND(ID_FILE_NEW, OnFileNew)
when you want a new doc just call:
AfxGetApp()->m_pDocManager->OnFileNew();
from anywhere in your app!!!
Override OnFileNew() in your App class like:
...
void CViewPortApp::OnFileNew()
{
}
Originally posted by: Narendra Jain
When I switch view, I want to close the old active view without destroying the Document. Please tell me how can I do it?
Originally posted by: yann
hi! i've tried your code, it works..... one time!!!!
So, when i run my application, i can open the child window, then i close it. then, whithout quit the application, i tried to open the child window a new time, and VC++ tell me about an assertion failed.....
What's wrong ?
Thank's, Yann.
ReplyOriginally posted by: Mike
I used this code and have one problem. When the view is opened up, there is a flickering on the screen. It is happening after the call to pFrame->LoadForm(). This call is creating the child frame at the wrong size and the pFrame->InitialUpdateFrame() resizes the view to the correct size. Is there a way to prevent this flickering from occuring?
ReplyOriginally posted by: jiangli
Dear sir:
What is the truetype font or vector font file format?
I wish you to tell me in a short time.
Thank you.
Originally posted by: Ehtesham Siddiqui
When attaching multiple views to a Document in an MDI Application we need two or more different "views" derived from the "CView" class to do so.... By default in App Wizard one view say "MyView" is created.
How can we create one or more additional views to add to the application...I created a copy of the origional view of the Application and reproduced "Resourse Strings" for it manually and added them to the "Strings Resourse" and then created a new Document-Template for it but it didn't work....... it gives an *Assertion Failed* at Run-Time when it executes the statement
<ccode>
in the member function of Application class
Please help me ..... Thanks in advance!!!
Ehtesham Siddiqui.
*URGENT*
if (!pFrame->LoadFrame(IDR_ASYSTEM2TYPE,WS_OVERLAPPEDWINDOW | FWS_PREFIXTITLE ,m_pMainWnd, &context ))return;
pFrame->InitialUpdateFrame(mp_doc,TRUE);
</ccode>
"CMyApp::OnView2()"
(The purpose of which is to create an instance of the second *newer* view)
Originally posted by: Mark Zarzour
Please add project files.
ReplyOriginally posted by: DD
Using the above I can create multiple views successfully. However, all my views have the same title, in this case "Just a demo". I would like each of my views to have a user provided title. I tried doing "SetWindowText(" XXX") " in the OnInitialUpdate() but it doesnt work. I tried the following:
void CSomeView::OnPaint()
{
CPaintDC dc(this); // device context for painting
CMainFrame* pFrame;
VERIFY( pFrame = (CMainFrame*)GetParentFrame() );
pFrame->SetWindowText("What ever the title is");
}
This works but with multiple windows open the painting sometimes does not refresh window titles correctly.
Is there a better way to set the window title?
Thanks
Originally posted by: Morn Lee
Document Class2: CCharttDoc
When I use CMainFrame::OnFileNew menu command,
eg:
Document Class1: CSheetDoc
View Class1: CSheetView
FrameWnd Class1: CSheetWnd
File Type1: *.sht
View Class2: CChartView
FrameWnd Class2: CChartWnd
File Type1: *.cht
How can I do next???