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 » PagePermanentWndGet Collapse All
Subject Author Date
Chris Douglass May 17, 2005 - 9:06 AM

I noticed this method, PagePermanentWndGet, as part of the CExtTabPageContainerWnd class.  However, I do not see this method documented anywhere.  I’m wondering if there is a corresponding PagePermanentWndSet type of method available? 


The reason I ask is the child window that is contained on each of my TabPageContainerWnd’s could change dynamically at run time.  So, instead of doing a


PageInsert( m_arrGrids[i].m_hWnd, g_arrSampleNames[i], hIconTabCaption,(i == 0) ? false : true,-1, (i == 0) ? true : false))


each time my child view/wnd is created/destroyed (this could happen N times during a normal user session), is there instead a way to just attach a new CWnd to an existing tab page dynamically?  like this perhaps:


PageAttach( nPageIndex, hWndNewChildViewWnd,...)


Hopefully I’m explaining this well, to be sure here’s the use case:


- SDI style UI with multiple tabs for each section of the app


- User selects Tools tab (e.g. tab index 2)


- Tools "Start Page" wnd is displayed (attached to TabPage via normal PageInsert invocation)


- User selects Tool from list on Tools start page


- While Tools tab index 2 is still selected, the new Tool (e.g. the My Mail Tool) window is created and displayed as a child of the Tools tab


- The Tools start page wnd is replaced by the My Mail Tool window


- User interacts with My Mail Tool and then repeats Tool selection for N number of Tools by navigating back to Tools Start Page and selecting a new Tool


Thanks!

Technical Support May 17, 2005 - 10:31 AM

The CExtTabPageContanerWnd class keeps HWND handles for its pages. It does not keep CWnd pointers because they can be temporary. The CExtTabPageContainerWnd::PagePermanentWndGet() method simply returns a pointer to the CWnd-based class that was instantiated in your application. The method returns NULL if HWND of the page does not correspond to the permanently instantiated CWnd-based class. So, your idea on ...PermanentWndSet() methods is not very good. You can use CExtTabPageContainerWnd::PageHwndSet() to attach a new HWND to the existing tab page. Please note that the previous HWND is not destroyed in this case. You can also remove a page and insert it again. It seems we simply forgot to document the CExtTabPageContainerWnd::PagePermanentWndGet() method. Thank you for this information.

Chris Douglass May 17, 2005 - 9:10 AM

Is this what I need to call??  Thanks!