// we are going to concatenate the two rtf streams together
// therefore drop the ending paren on the first stream as well
// as the starting header on the second stream
// find ending parenthesis and position just before it
strTemp = strPane0.Left (strPane0.ReverseFind('}'));
file.Write (strTemp, strTemp.GetLength());
// drop RTF header information through \fonttbl data because
// you can not, rather, should not nest RTF with header information
// notice I break the rules till I finish my RTF reader
//
// RTF Version 1.5 Specification defines the following header syntax:
// \rtf<charset> \deff? <fonttbl><filetb>?<colortbl>?<stylesheet>?
// <listtables>?<revtbl>?
//
strTemp = strPane1;
char *pDest = strstr((LPCTSTR)strTemp, _T("{\\colortbl"));
int offset = 0;
if (pDest != NULL)
{
offset = pDest - (LPCTSTR)strTemp;
}
// complete rtf stream with a closing parenthesis and write to shared file
//
strTemp = strPane1.Mid (offset);
strTemp += "}";
file.Write (strTemp, strTemp.GetLength());
void CUIMainWindow::OnUpdateEditBothPanes(CCmdUI* pCmdUI)
{
// if either pane isn't a CUIView class disable button
// CUIView is a CRichEditView derived class