Solved

one formview to another form view..

Posted on 2001-07-04
8
295 Views
Last Modified: 2013-11-20
Hi friends,
In my application , i need to call one formview from another formview.
could you kindly help me.
thnaks!
sham.
0
Comment
Question by:shambhu_421
8 Comments
 
LVL 42

Expert Comment

by:sedgwick
ID: 6253037
are the formviews from the same document?

0
 
LVL 49

Expert Comment

by:DanRollins
ID: 6253807
If you want the second view to pop up and float over the first view, then your best bet is to use a modal dialogbox for the scond view.

If you want the second view to replace the first view, you need to use code that will replace the current view.  This is a very common need, even if it is a bit tricky.  It is decribed in:

Q149257 - How to Replace a View in a Splitter Window
http://support.microsoft.com/support/kb/articles/Q149/2/57.ASP

and

Q102829 - How to Replace a View in a CMDIChildWnd Window
http://support.microsoft.com/support/kb/articles/Q102/8/29.asp 

-- Dan
0
 

Author Comment

by:shambhu_421
ID: 6254428
Hi sedgwick,
yes,forms are in same document.
thanks,
sham.
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 42

Expert Comment

by:sedgwick
ID: 6254658
so iterate your document using POSITION:

//u r in the scope of one of the forms view:
CMyDocument()* pDoc = GetDocument();
POSITION pos = pDoc->GetFirstViewPosition();
while(pos)
{
CMyFormView* pView = (CMyFormView*)pDoc->GetNextView(pos);
if(pView == this)
    continue; //the same form view

/*since u can have more than 2 viewes in the document so u probably have an identification in order to determine which form view u want to work with.*/

}

good luck
0
 

Expert Comment

by:bharathd
ID: 6255302
U can use the IsKindof() function to determine what view you are iterating through. This function violates polymorphism but is handy at times like this.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 6309914
hi shambhu_421,
Do you have any additional questions?  Do any comments need clarification?

-- Dan
0
 
LVL 49

Accepted Solution

by:
DanRollins earned 50 total points
ID: 6352566
hi shambhu_421,
Do you have any additional questions?  Do any comments need clarification?

-- Dan
0
 
LVL 1

Expert Comment

by:Computer101
ID: 6703238
Comment from DanRollins accepted as answer.

Thank you
Computer101
Community Support Moderator
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
deburging in oracle form 12 98
Excel Use VBA to get user's Mac Address for their computer 5 159
tripleUp challenge 7 78
Excel file not created as expected 7 70
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question