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 » Tab question Collapse All
Subject Author Date
alexey Shetinin May 27, 2005 - 3:41 PM

Hi.


Help me, please.


It’s about using of CExtTabWnd and CExtTabPageContainerWnd from CView-derived classes.
Is it possible(it is, of course), and what should I do for it? In Samples all logic of
these elements is handled in customized classes, derived from subject, and used in bars.
I’ve not seen the sample,working directly with objects of this classes,
so it’s difficult to understand way of using them.
 


What i’ve understood:
when I initialized objects in CView::OnInitialUpdate(.) and redefined PreTranslateMessage(.)
and OnCmdMsg(.) to retranslate msgs to the TabPages CWnd - object of  CExtTabWnd showes me only
tabs without any content windows in it, and CExtTabPageContainerWnd’s object doesn’t show me even tabs.


Handling of EN_CHANGE CmdMsg (as in samples) in CView is not working , TCITEM doesn’t connect with these elements -
so how can I use them without deriving?


Other question is - am i right with attaching HWND to the CExtTabWnd object through the LPARAM at the ItemInsert function? In CExtTabPageContainerWnd HWND translates through the PageInsert(.), but there is no such possibility in CExtTabWnd, in my view.
 
Thank’s for reading.


 

Technical Support May 29, 2005 - 9:20 AM

The CExtTabWnd class is not based on the standard MFC’s CTabCtrl class. It is a control written from scratch. To handle events of this control, you need to create and use a CExtTabWnd-derived class and override appropriate virtual methods. But your task does not deal with CExtTabWnd. It relates to the CExtTabPageContainerWnd class that is also written from scratch. It contains one child CExtTabWnd window in which each item corresponds to a certain child page window. We guess you should create a tab page container window inside your CView window and move it to fit all view window’s client size inside the CYourView::OnSize() handler. All child pages of the tab page container should be created as it is done in Prof-UIS samples. Of course, you can implement your own message pre-translation and command updating rules by invoking PreTranslateMessage() and OnCmdMsg() virtual methods of the currently active page window.

You can insert a page into the CExtTabPageContainerWnd window with the PageInsert() method, which inserts a tab item associated with the page and sets LPARAM of the inserted tab item to HWND handle of the page window. But this deals with internals of CExtTabPageContainerWnd and such details are redundant when you are using this method.