术语 | CAsyncMonikerFile::OnDataAvailable | |||||||||||||
释义 | CAsyncMonikerFile::OnDataAvailable virtual void OnDataAvailable( DWORD dwsize, DWORD bscfFlag ); 参数:
说明: 在异步约束操作中,异步标识调用OnDataAvailable,向有效的客户端提供数据。缺省情况下,此函数不作任何操作。请参看下面一种实现的例子。 示例: //refer to CDataPathProperty. void CAsyncMyTextProperty::OnDataAvailable(DWORD dwsize, DWORD bscfFlag) { if((bscfFlag& BSCF_FIRSTDATANOTIFICATION) != 0) { m_dwReadBefore = 0;m_strText.Empty(); } DWORD dwArriving = dwSize _ m_dwReadBefore; if (dwArriving > 0) { int nLen = m_strText.GetLength(); ASSERT(nLen == m_dwReadBefore); LPTSTR psz = m_strText.GetBuffer(nLen + dwArriving); Read(psz+nLen,dwArriving); m_strText.ReleaseBuffer(nLen + dwArriving); m_dwReadBefore = dwSize;GetControl()->Invalidate(); } } 请参阅:CDataPathProperty |
|||||||||||||
随便看 |
|
MFC类库中文详解手册包含4274条MFC类库参考词条,基本涵盖了Microsoft基本类库中的类、全局函数、全局变量和宏的内容,是计算机编程的有利工具。