开发学院手机开发Windows Mobile 开发 Windows Mobile 编程问题之外的思考 阅读

Windows Mobile 编程问题之外的思考

 2010-10-20 08:01:33 来源:WEB开发网   
核心提示:SplitCString(iszString,*strArray,L"");textsize = GetDC()->GetTextExtent(L"股");int textNumber = lineWidth/textsize.cx;for(int j = 0;j <

SplitCString(iszString,*strArray,L" ");

textsize = GetDC()->GetTextExtent(L"股");

int textNumber = lineWidth/textsize.cx;

for(int j = 0;j < strArray->GetSize();j++)

{

splitStr = strArray->GetAt(j);

int columeNumber = splitStr.GetLength()/textNumber+((splitStr.GetLength()%textNumber)>0?1:0);

if(columeNumber == 0)

{

STOCKRANGE inforDetailContent;

inforDetailContent.stockCode = splitStr;

inforDetailContent.decimalNumber = ++wordNumber;

StockRangeData.push_back(inforDetailContent);

STOCKRANGE blankContent;

blankContent.stockCode = L"";

blankContent.decimalNumber = ++wordNumber;

StockRangeData.push_back(blankContent);

continue;

}else

{

for(int i = 0;i < columeNumber;i++)

{

STOCKRANGE inforDetailContent;

if(splitStr.GetLength() > textNumber)

{

inforDetailContent.stockCode = splitStr.Left(textNumber);

splitStr = splitStr.Right(splitStr.GetLength()-textNumber);

inforDetailContent.decimalNumber = ++wordNumber;

StockRangeData.push_back(inforDetailContent);

}else

{

inforDetailContent.stockCode = splitStr;

inforDetailContent.decimalNumber = ++wordNumber;

StockRangeData.push_back(inforDetailContent);

STOCKRANGE blankContent;

blankContent.stockCode = L"";

blankContent.decimalNumber = ++wordNumber;

StockRangeData.push_back(blankContent);

}

continue;

}

}

}

在使用新的方法之后,资讯文本内容的解析速度大为提升,或许这并不是技术上的问题,而是愿意不愿意多思考的问题!

上一页  1 2 

Tags:Windows Mobile 编程

编辑录入:爽爽 [复制链接] [打 印]
[]
  • 好
  • 好的评价 如果觉得好,就请您
      0%(0)
  • 差
  • 差的评价 如果觉得差,就请您
      0%(0)
赞助商链接