コード例 #1
0
// Headers - fetch will get PR_TRANSPORT_MESSAGE_HEADERS
// or if they do not exist will build a header from
//  PR_DISPLAY_TO, _CC, _BCC
//  PR_SUBJECT
//  PR_MESSAGE_RECIPIENTS
// and PR_CREATION_TIME if needed?
void CMapiMessage::BuildHeaders( void)
{
  // Try to the to line.
  m_headers.Truncate();
  AddHeader( m_headers, PR_DISPLAY_TO, "To: ");
  AddHeader( m_headers, PR_DISPLAY_CC, "CC: ");
  AddHeader( m_headers, PR_DISPLAY_BCC, "BCC: ");
  AddDate( m_headers);
  AddSubject( m_headers);
  AddFrom( m_headers);
}
コード例 #2
0
BOOL CMapiMessage::FetchHeaders( void)
{
  LPSPropValue pVal = CMapiApi::GetMapiProperty( m_lpMsg, PR_TRANSPORT_MESSAGE_HEADERS);
  if (pVal && CMapiApi::IsLargeProperty( pVal)) {
    m_headers.Truncate();
    CMapiApi::GetLargeStringProperty( m_lpMsg, PR_TRANSPORT_MESSAGE_HEADERS, m_headers);
  }
  else if (pVal && (PROP_TYPE( pVal->ulPropTag) == PT_TSTRING) && (pVal->Value.LPSZ) && (*(pVal->Value.LPSZ))) {
    m_headers = pVal->Value.LPSZ;
  }
  else {
    // Need to build the headers from the other stuff
    m_headers.Truncate();
    BuildHeaders();
  }

  if (pVal)
    CMapiApi::MAPIFreeBuffer( pVal);

  m_fromLine.Truncate();
  if (NeedsFromLine()) {
    BuildFromLine();
  }

  if (!m_fromLine.IsEmpty()) {
    MAPI_DUMP_STRING(m_fromLine.get());
  }
  MAPI_DUMP_STRING(m_headers.get());
  MAPI_TRACE0("\r\n");

  ProcessHeaders();

  if (!m_headers.IsEmpty()) {
    if (!m_bHasSubject)
      AddSubject( m_headers);
    if (!m_bHasFrom)
      AddFrom( m_headers);
    if (!m_bHasDate)
      AddDate( m_headers);
    m_headers.Trim( kWhitespace, PR_FALSE, PR_TRUE);
    m_headers += "\x0D\x0A";
  }

  return( !m_headers.IsEmpty());
}
コード例 #3
0
ファイル: DockCont.cpp プロジェクト: dreamsxin/ultimatepp
void DockCont::Layout()
{
	if (waitsync) {
		waitsync = false;
		if (GetCount() == 1) {
			Value v = tabbar.Get(0);
			if (IsDockCont(v)) {
				DockCont *dc = ContCast(v);
				AddFrom(*dc);
				base->CloseContainer(*dc);
				RefreshLayout();
			}
		}
		if (!tabbar.GetCount())
			base->CloseContainer(*this);
		TabSelected();
	}
}