本文整理汇总了C++中CKnownFile::GrabImage方法的典型用法代码示例。如果您正苦于以下问题:C++ CKnownFile::GrabImage方法的具体用法?C++ CKnownFile::GrabImage怎么用?C++ CKnownFile::GrabImage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CKnownFile
的用法示例。
在下文中一共展示了CKnownFile::GrabImage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ProcessPreviewRequest
void CMMServer::ProcessPreviewRequest(CMMData* data, CMMSocket* sender){
uint8 byFileType = data->ReadByte();
uint8 byFileIndex = data->ReadByte();
uint16 nDisplayWidth = data->ReadShort();
uint8 nNumber = data->ReadByte();
CKnownFile* knownfile = NULL;
bool bError = false;
if (byFileType == MMT_PARTFILFE){
if (byFileIndex >= m_SentFileList.GetSize()
|| !theApp.downloadqueue->IsPartFile(m_SentFileList[byFileIndex]))
{
bError = true;
}
else
knownfile = m_SentFileList[byFileIndex];
}
else if (byFileType == MMT_FINISHEDFILE){
if (byFileIndex >= m_SentFinishedList.GetSize()
|| !theApp.knownfiles->IsKnownFile(m_SentFinishedList[byFileIndex]))
{
bError = true;
}
else
knownfile = m_SentFinishedList[byFileIndex];
}
if (!bError){
if (h_timer != 0)
bError = true;
else{
h_timer = SetTimer(0,0,20000,CommandTimer);
if (!h_timer){
bError = true;
}
else{
if (nDisplayWidth > 140)
nDisplayWidth = 140;
m_byPendingCommand = MMT_PREVIEW;
m_pPendingCommandSocket = sender;
if (!knownfile->GrabImage(1,(nNumber+1)*50.0,true,nDisplayWidth,this))
PreviewFinished(NULL,0);
}
}
}
if (bError){
CMMPacket* packet = new CMMPacket(MMP_GENERALERROR);
sender->SendPacket(packet);
ASSERT ( false );
return;
}
}