-
January 20th, 2011, 01:40 AM
#1
[RESOLVED] How can check which FormView is currectly visible?
Hi all,
i m working on SDI type splitter application.
i have split my application in one row and two column ,for first column im using CTreeView derived class and for second column i m using CFormView derived class.
in second column i m replace diffrent-2 formview according to need.
its working fine.but at certain point i need to chk which formview is currently visible in second column.
please tell me what function and api use for this.
thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
-
January 20th, 2011, 02:12 AM
#2
Re: How can check which FormView is currectly visible?
If these two form views are of different classes (CFormView1 and CFormView2) then you could use CObject::IsKindOf to check the class.
If two instances of the same class (CFormView1) are used - add some member variable to the CFormView1 class (say, int Inst) and set it to 1 for the first instance and to two - for the second one.
Victor Nijegorodov
-
January 20th, 2011, 02:53 AM
#3
Re: How can check which FormView is currectly visible?
i m using this.
Code:
Check_Current_View(CFormView * pViewClass)
{
BOOL flag=FALSE;
if ((GetPane(row,col)->IsKindOf(pViewClass))==TRUE)
{
flag=TRUE;
}
return flag;
}
when call this function from toolbar of menu item function than its problem generate.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
-
January 20th, 2011, 03:12 AM
#4
Re: How can check which FormView is currectly visible?
1. You must not to compare ant BOOL variable wit TRUE! the correct way to test BOOL is
Code:
BOOL bValue = ...;
...
if(bValue)
{
// TRUE
}
.....
if(!bValue)
{
// FALSE
}
2. I wrote you many times that you must read the documentation about using any API and any MFC method in MSDN! PLease, do it!
Victor Nijegorodov
-
January 21st, 2011, 12:06 AM
#5
Re: How can check which FormView is currectly visible?
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|