Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » What should be the default CWnd* parameter in CExtTabPagecontainerWnd .....? Collapse All
Subject Author Date
Debabrata Mukherjee Sep 18, 2007 - 9:55 AM

What should be the default CWnd* parameter in CExtTabPagecontainerWnd.PageInsert(CWnd*). I have a CView called PresView and I write the following:
m_pChildView->PageInsert (m_pPresView->GetSafeHwnd(),_T("Name"));

This process gets repeated gain when i need to add another tab. But now the catch is.... the first tab which was created over the PresView is over wriiten by the tab that was created later. The first tab physically exists but the view which should be associated with it gets overrritten by the latest tab. Do you hav any resolution to this..

Can we have a default CWnd* paranmeter

Please suggest

Technical Support Sep 28, 2007 - 12:37 PM

You can create a view window using the following code:

CWnd * pParentWindow = . . . // tab page container in your project
CCreateContext _cc;
      _cc.m_pCurrentDoc = NULL;
      _cc.m_pCurrentFrame = pParentWindow;
      _cc.m_pLastView = NULL;
      _cc.m_pNewDocTemplate = NULL;
      _cc.m_pNewViewClass = RUNTIME_CLASS( CYourView );
CWnd * pWndView = CreateView( &_cc );
      if( pWndView == NULL )
      {
            TRACE0("Failed to create your view window\n");
            return . . . 
      }
CYourView * pView = STATIC_DOWNCAST( CYourView, pWndView );
After that you should initialize the pView view window so it can display appropriate data.

Debabrata Mukherjee Sep 28, 2007 - 6:46 AM

As we discussed in the call with Sergiy, the same window cannot be used to load more than on Page ContainerWnd.
Now I am creating new windows for separate tabpagecontainer windows.
But do you have any idea that how can I create a copy of one CView on new windows that I am creating.?
Becoz at the end what i want to achieve is show the different versions same view on different windows . I can manage to activate the different versions but not able to create views that can show them.

Technical Support Sep 21, 2007 - 8:18 AM

Yes, if your connection is fast enough, that would be much easier to find what’s wrong by sharing your desktop.

Debabrata Mukherjee Sep 20, 2007 - 8:59 AM

What we need to implement is --

We want to dynamically add tabs at runtime by user action .There is a Mainframe on which I already have 3 tabpage containers representing 3 views. Out of these 3 views the last one is called PresView. Now if I add new tabs with the line
m_pChildView->PageInsert (m_pPresView->GetSafeHwnd(),_T("Name"));

For every new entry of tab... at runtime, then the PresView gets updated by the last page and all exisitng pages are overwritten.


I think we should go for a desktop sharing as it could help us mitigate the problem faster. Can we schedule it as soon as possible as it is very very urgent. I will be sending you a mail request for this from my id. Sanket_das1@yahoo.co.in

Technical Support Sep 19, 2007 - 12:54 PM

The CExtTabPagecontainerWnd control is designed in a way that it cannot contain the same window under different tabs. Would you tell us what you need to implement so we can suggest an appropriate solution?