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.
Subject |
Author |
Date |
|
Marcos Mori de Sique
|
Nov 6, 2002 - 7:31 PM
|
Hi Sergiy,
I need to display changes in the document with (*) like visual studio, how can i do this ?
Cheers Mori
|
|
Sergiy Lavrynenko
|
Nov 8, 2002 - 3:46 AM
|
Hi Mori,
You should use your own class derived from CExtTabMdiWnd and implement one virtual method like in this sample:
LPCTSTR CMyCustomTabMdiWnd::OnTabWndQueryItemText( const CExtTabWnd::TAB_ITEM_INFO * pTii ) const { ASSERT_VALID( pTii ); HWND hWndMdiChild = (HWND)pTii->LParamGet(); if( hWndMdiChild == NULL || (! ::IsWindow(hWndMdiChild) ) ) return _T(""); CWnd * pWnd = CWnd::FromHandle( hWndMdiChild ); ASSERT( pWnd != NULL ); ASSERT_KINDOF( CMDIChildWnd, pWnd ); static CString sText( _T("") ); CDocument * pActiveDoc = ((CMDIChildWnd *)pWnd)-> GetActiveDocument(); if( pActiveDoc != NULL ) { sText = pActiveDoc->GetTitle(); if( pActiveDoc->IsModified() ) sText += _T(" *"); } if( sText.IsEmpty() ) pWnd->GetWindowText(sText); return (sText.IsEmpty()) ? _T("") : LPCTSTR(sText); }
Best regards, Sergiy Lavrynenko.
|
|