Cocos2d-x串算出Size方法
项目需要,根据所输入的字符串,的需要计算串帐户Size。
包代码如下面。只需要传递一个字符串,您可以返回Size:
Size ChartDemoScene::calculateFontSize(const char *str )
{
std::string tempString = str;
log("tempString = %s",tempString.c_str());
size_t computeCount = tempString.size(); //假设字符串非常长每次抽取100个字符来计算size;
Size size = Size(0,0);
for (int i = 0; i<computeCount ;)
{
std::string substring = tempString.substr(i,1);
if ((substring.c_str()[0] & 0x80 )!=0) //是汉字
{
substring = tempString.substr(i , 3);
i += 3;
}
else
{
i++;
}
//CCLog("subString = %s ",substring.c_str());
auto tempLabel = LabelTTF::create(substring.c_str(),"",25);
tempLabel->setHorizontalAlignment(cocos2d::TextHAlignment::LEFT);
Size tmpLsize = tempLabel->getContentSize();
size.width+=tmpLsize.width;
} float fHeight= 0;
if( size.width > chartWidth)//大于容器的宽度
{
fHeight = (size.width / 200 );//计算须要多少行
}
int nHeight = ceil(fHeight); if (nHeight == 0)
{
nHeight = 1;
} Size labelSize ;
if (size.width < chartWidth)
{
labelSize = Size(size.width,nHeight*32);//计算容器的Size
}
else
{
labelSize = Size(chartWidth,nHeight*28);
} //CCLog("labelSize = (%f, %f)",labelSize.width ,labelSize.height);
//CCLog("fHeight = %f nHeight = %d " ,fHeight ,nHeight);
return labelSize;
}
样例:
1、AppDelegate.cpp中加入例如以下代码
auto scene = ChartDemoScene::createScene(); // run
director->runWithScene(scene);
(1)ChartDemoScene.hChartDemoScene.h
//
// ChartDemoScene.h
// chartDemo
//
// Created by chen on 14-9-2.
//
// #ifndef __chartDemo__ChartDemoScene__
#define __chartDemo__ChartDemoScene__ #include "cocos2d.h"
#include "ui/CocosGUI.h"
#include "../cocos2d/extensions/cocos-ext.h"
using namespace cocos2d::ui;
USING_NS_CC;
USING_NS_CC_EXT; class ChartDemoScene : public cocos2d::Layer//,public cocos2d::extension::EditBoxDelegate
{
public:
// there's no 'id' in cpp, so we recommend returning the class instance pointer
static cocos2d::Scene* createScene(); // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
virtual bool init(); // a selector callback
void menuCloseCallback(cocos2d::Ref* pSender); // implement the "static create()" method manually
CREATE_FUNC(ChartDemoScene); // virtual void editBoxEditingDidBegin(cocos2d::extension::EditBox* editBox);
// virtual void editBoxEditingDidEnd(cocos2d::extension::EditBox* editBox);
// virtual void editBoxTextChanged(cocos2d::extension::EditBox* editBox, const std::string& text);
// virtual void editBoxReturn(cocos2d::extension::EditBox* editBox); void touchEvent(Ref *pSender, Widget::TouchEventType type);
void textFieldEvent(Ref* pSender, TextField::EventType type);
void showAlertShow(std::string contentString);
void alertCallback(ui::Text* alert); Size calculateFontSize(const char *str); std::string getcurrTime();//获取当前年月日
std::string getcurrMonthTime();//获取时分秒 // EditBox* editText;
TextField* editText;
Text* text;
TextField* _text;//获取被删除Item的内容
std::string file_path;//存放消息记录
TextField* textContent;
ui::Button* sendBtn;
std::string str;
Size winSize;
float chartWidth;
size_t length;
ui::ListView* _listView; };
#endif /* defined(__chartDemo__ChartDemoScene__) */
(2)ChartDemoScene.cpp
#include "ChartDemoScene.h"
#include "stdio.h" enum alertTag
{
Alert_Tag = 1000 }AlertTag; enum textTag
{
T_Tag = 100
}TextTag; USING_NS_CC;
int count = 1;
int _rem = 0;
Scene* ChartDemoScene::createScene()
{
// 'scene' is an autorelease object
auto scene = Scene::create();
scene->setColor(Color3B::BLACK);
// 'layer' is an autorelease object
auto layer = ChartDemoScene::create();
layer->setAnchorPoint(Vec2::ANCHOR_MIDDLE_BOTTOM);
layer->setContentSize(Size(640,960));
// add layer as a child to scene
scene->addChild(layer); // return the scene
return scene;
} // on "init" you need to initialize your instance
bool ChartDemoScene::init()
{
bool bRet = false;
do{
CC_BREAK_IF(!Layer::init());
//大背景
winSize = Director::getInstance()->getWinSize();
file_path = FileUtils::getInstance()->getWritablePath() + "chartContent.txt"; chartWidth = winSize.width *3 / 5;
auto sprite = Sprite::create("orange_edit.png");
sprite->setScaleX(winSize.width / sprite->getContentSize().width);
sprite->setScaleY(winSize.height / sprite->getContentSize().height);
sprite->setAnchorPoint(Vec2::ANCHOR_MIDDLE);
sprite->setPosition(Vec2(winSize.width/2,winSize.height/2));
addChild(sprite); auto layerColor = LayerColor::create(Color4B(43, 177, 233, 255));
layerColor->setContentSize(Size(winSize.width,100));
layerColor->ignoreAnchorPointForPosition(false);
layerColor->setAnchorPoint(Vec2::ANCHOR_MIDDLE_TOP);
layerColor->setPosition(Vec2(winSize.width/2,winSize.height));
addChild(layerColor,4); //底部输入栏
auto layout = Layout::create();
layout->setSize(Size(winSize.width,100));
layout->setAnchorPoint(Vec2::ZERO);
layout->setPosition(Vec2::ZERO);
layout->setBackGroundColorType(cocos2d::ui::Layout::BackGroundColorType::SOLID);
layout->setBackGroundColor(Color3B(185,185,185));
//消息显示栏
_listView = ListView::create();
_listView->setDirection(ui::ScrollView::Direction::VERTICAL);
_listView->setTouchEnabled(true);
_listView->setBounceEnabled(true);
_listView->setGravity(cocos2d::ui::ListView::Gravity::BOTTOM);
// _listView->setItemsMargin(2);
_listView->setBackGroundColorType(cocos2d::ui::Layout::BackGroundColorType::SOLID);
_listView->setBackGroundColor(Color3B::WHITE);
_listView->setSize(Size(winSize.width,winSize.height-layout->getSize().height-25-100));
_listView->setAnchorPoint(Vec2::ANCHOR_MIDDLE_BOTTOM);
_listView->setPosition(Vec2(winSize.width/2,layout->getSize().height+25));
addChild(_listView); //底部输入框背景
auto bg = Sprite::create("whitebg.png");
bg->setScaleX(winSize.width*3/5 / bg->getContentSize().width);
bg->setScaleY(80 / bg->getContentSize().height);
bg->setAnchorPoint(Vec2::ANCHOR_MIDDLE_LEFT);
bg->setPosition(Vec2(winSize.width/5,layout->getSize().height/2));
layout->addChild(bg); //
editText = TextField::create("","",30);
editText->ignoreContentAdaptWithSize(false);
editText->setSize(Size(winSize.width*3/5,80));
editText->setTextHorizontalAlignment(cocos2d::TextHAlignment::LEFT);
editText->setTextVerticalAlignment(cocos2d::TextVAlignment::BOTTOM);
editText->setAnchorPoint(Vec2::ANCHOR_MIDDLE_LEFT);
editText->setPosition(Vec2(winSize.width/5,layout->getSize().height/2));
editText->setColor(Color3B::BLACK);
editText->addEventListener(CC_CALLBACK_2(ChartDemoScene::textFieldEvent, this));
layout->addChild(editText);
addChild(layout); //发送按钮
sendBtn = ui::Button::create("orange_edit.png");
sendBtn->setAnchorPoint(Vec2::ANCHOR_MIDDLE_RIGHT);
sendBtn->setPosition(Vec2(winSize.width - 20,layout->getSize().height/2));
addChild(sendBtn); sendBtn->addTouchEventListener(CC_CALLBACK_2(ChartDemoScene::touchEvent,this)); auto alert_Text = ui::Text::create();
alert_Text->setSize(Size(50, 200));
alert_Text->setTag(Alert_Tag);
alert_Text->setOpacity(0);
alert_Text->setFontSize(35);
char* userdata = "11";
alert_Text->setUserData(userdata);
alert_Text->setColor(Color3B::BLACK);
alert_Text->setPosition(Vec2(winSize.width/2,winSize.height/8));
addChild(alert_Text); bRet = true;
}while(0);
return bRet;
} Size ChartDemoScene::calculateFontSize(const char *str )
{
std::string tempString = str;
log("tempString = %s",tempString.c_str());
size_t computeCount = tempString.size(); //假设字符串非常长每次抽取100个字符来计算size;
Size size = Size(0,0);
for (int i = 0; i<computeCount ;)
{
std::string substring = tempString.substr(i,1);
if ((substring.c_str()[0] & 0x80 )!=0) //是汉字
{
substring = tempString.substr(i , 3);
i += 3;
}
else
{
i++;
}
//CCLog("subString = %s ",substring.c_str());
auto tempLabel = LabelTTF::create(substring.c_str(),"",25);
tempLabel->setHorizontalAlignment(cocos2d::TextHAlignment::LEFT);
Size tmpLsize = tempLabel->getContentSize();
size.width+=tmpLsize.width;
} float fHeight= 0;
if( size.width > chartWidth)
{
fHeight = (size.width / 200 );
}
int nHeight = ceil(fHeight); if (nHeight == 0)
{
nHeight = 1;
} Size labelSize ;
if (size.width < chartWidth)
{
labelSize = Size(size.width,nHeight*32);
}
else
{
labelSize = Size(chartWidth,nHeight*28);
} //CCLog("labelSize = (%f, %f)",labelSize.width ,labelSize.height);
//CCLog("fHeight = %f nHeight = %d " ,fHeight ,nHeight);
return labelSize;
} void ChartDemoScene::touchEvent(cocos2d::Ref *pSender, Widget::TouchEventType type)
{
switch (type) {
case ui::Widget::TouchEventType::ENDED:
{
if(str.empty())
{
showAlertShow("输入内容不能为空");
break;
} log("str = %s",str.c_str()); auto time = getcurrMonthTime().c_str();
auto text = Text::create(time, "", 30);
text->setAnchorPoint(Vec2::ANCHOR_MIDDLE);
text->setColor(Color3B::BLACK); auto _timeLayout = Layout::create();
_timeLayout->setSize(Size(_listView->getSize().width,60));
_timeLayout->setLayoutType(cocos2d::ui::Layout::Type::RELATIVE); auto rp_time = RelativeLayoutParameter::create();
rp_time->setAlign(cocos2d::ui::RelativeLayoutParameter::RelativeAlign::CENTER_IN_PARENT);
text->setLayoutParameter(rp_time);
_timeLayout->addChild(text);
_listView->pushBackCustomItem(_timeLayout); if(count % 2)
{
count++;
auto _lLayout = Layout::create();
_lLayout->setSize(Size(_listView->getSize().width,80));
_lLayout->setLayoutType(cocos2d::ui::Layout::Type::RELATIVE); auto _lHeader = ui::ImageView::create("logo_douban.png");
_lHeader->setAnchorPoint(Vec2::ANCHOR_MIDDLE);
_lHeader->setScale(0.5); auto rp_l = RelativeLayoutParameter::create();
rp_l->setMargin(Margin(10,0,0,0));
rp_l->setRelativeName("head");
rp_l->setAlign(cocos2d::ui::RelativeLayoutParameter::RelativeAlign::PARENT_LEFT_CENTER_VERTICAL);
_lHeader->setLayoutParameter(rp_l);
_lLayout->addChild(_lHeader); auto _lTextContent = TextField::create("","",30);
_lTextContent->ignoreContentAdaptWithSize(false);
auto size = calculateFontSize(str.c_str());
_lTextContent->setSize(size);
_lTextContent->setTextHorizontalAlignment(cocos2d::TextHAlignment::LEFT); if(size.width < chartWidth)
{
_lTextContent->setTextHorizontalAlignment(cocos2d::TextHAlignment::RIGHT);
}
_lTextContent->setTextVerticalAlignment(cocos2d::TextVAlignment::CENTER);
_lTextContent->setTouchEnabled(false);
_lTextContent->setTag(T_Tag);
_lTextContent->setAnchorPoint(Vec2::ANCHOR_MIDDLE_LEFT);
_lTextContent->setColor(Color3B::BLACK);
_lTextContent->setText(str);
_lLayout->addChild(_lTextContent);
str.clear(); auto rp_t = RelativeLayoutParameter::create();
rp_t->setMargin(Margin(10,0,0,0));
rp_t->setRelativeToWidgetName("head");
rp_t->setAlign(cocos2d::ui::RelativeLayoutParameter::RelativeAlign::LOCATION_RIGHT_OF_CENTER);
_lTextContent->setLayoutParameter(rp_t); _listView->pushBackCustomItem(_lLayout); }else
{
count++;
auto _rLayout = Layout::create();
_rLayout->setSize(Size(_listView->getSize().width,80));
_rLayout->setLayoutType(cocos2d::ui::Layout::Type::RELATIVE); auto _rHeader = ui::ImageView::create("logo_mingdao.png");
_rHeader->setAnchorPoint(Vec2::ANCHOR_MIDDLE);
_rHeader->setScale(0.5); auto rp_r = RelativeLayoutParameter::create();
rp_r->setMargin(Margin(0,0,10,0));
rp_r->setRelativeName("head");
rp_r->setAlign(cocos2d::ui::RelativeLayoutParameter::RelativeAlign::PARENT_RIGHT_CENTER_VERTICAL);
_rHeader->setLayoutParameter(rp_r);
_rLayout->addChild(_rHeader); auto _rTextContent = TextField::create("","",30);
_rTextContent->setTag(T_Tag);
_rTextContent->ignoreContentAdaptWithSize(false);
auto size = calculateFontSize(str.c_str());
_rTextContent->setSize(size);
_rTextContent->setTextHorizontalAlignment(cocos2d::TextHAlignment::LEFT);
_rTextContent->setTextVerticalAlignment(cocos2d::TextVAlignment::CENTER);
_rTextContent->setTouchEnabled(false);
_rTextContent->setAnchorPoint(Vec2::ANCHOR_MIDDLE_RIGHT);
_rTextContent->setColor(Color3B::BLACK);
_rTextContent->setText(str);
str.clear();
auto rp_l = RelativeLayoutParameter::create();
rp_l->setMargin(Margin(0,0,10,0));
rp_l->setRelativeToWidgetName("head");
rp_l->setAlign(cocos2d::ui::RelativeLayoutParameter::RelativeAlign::LOCATION_LEFT_OF_CENTER);
_rTextContent->setLayoutParameter(rp_l);
_rLayout->addChild(_rTextContent); _listView->pushBackCustomItem(_rLayout);
} // if(_listView->getContentSize().height > _listView->getSize().height)
// {
_listView->scrollToBottom(0.5, true);
// }
editText->setText(""); if(count > 3 )
{
_listView->removeItem(0);//删除时间标签,此时Item(0)就是内容标签
auto temp = static_cast<Layout*>(_listView->getItem(0));//获取当前内容标签
if(_text)
{
removeChild(_text);
}
_text = static_cast<TextField*>(temp->getChildByTag(T_Tag));//获取内容标签
log("string = %s", _text->getStringValue().c_str());//获取内容
log("file_path = %s",file_path.c_str());
FILE* fp = std::fopen(file_path.c_str(),"at+");
CCASSERT(fp != NULL, "file open error");
length = _text->getStringValue().length();
log("length = %lu",length);
fwrite(_text->getStringValue().c_str(), length, 1, fp);
fclose(fp); _listView->removeItem(0);
} break;
}
default:
break;
}
} void ChartDemoScene::textFieldEvent(cocos2d::Ref *pSender, TextField::EventType type)
{
switch (type)
{
case TextField::EventType::ATTACH_WITH_IME:
{
TextField* textField = dynamic_cast<TextField*>(pSender);
Size widgetSize = winSize;
runAction(CCMoveTo::create(0.225f,Vec2(0, widgetSize.height / 2.0f)));
textField->setTextHorizontalAlignment(TextHAlignment::LEFT);
textField->setTextVerticalAlignment(TextVAlignment::TOP);
}
break; case TextField::EventType::DETACH_WITH_IME:
{
TextField* textField = dynamic_cast<TextField*>(pSender);
Size widgetSize = winSize;
runAction(CCMoveTo::create(0.175f, Vec2(0, 0)));
textField->setTextHorizontalAlignment(TextHAlignment::LEFT);
textField->setTextVerticalAlignment(TextVAlignment::CENTER); str = editText->getStringValue().c_str();
str += "\n";
}
break; case TextField::EventType::INSERT_TEXT:
break; case TextField::EventType::DELETE_BACKWARD:
break; default:
break;
} } void ChartDemoScene::showAlertShow(std::string contentString)
{
auto alert = dynamic_cast<ui::Text*>(getChildByTag(Alert_Tag));
if (alert->getUserData() == "11") {
alert->setOpacity(255);
char* userdata = "110";
alert->setUserData(userdata); alert->setString(contentString);
auto call_func = CallFunc::create(CC_CALLBACK_0(ChartDemoScene::alertCallback, this,alert));
auto seq = Sequence::create(FadeOut::create(1.0f),call_func, NULL);
alert->runAction(seq);
} } void ChartDemoScene::alertCallback(ui::Text* alert)
{ alert->setString("");
char* userdata = "11";
alert->setUserData(userdata); } std::string ChartDemoScene::getcurrTime()//获取当前年月日
{ #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) struct timeval now;
struct tm* time; gettimeofday(&now, NULL); time = localtime(&now.tv_sec);
int year = time->tm_year + 1900; char date[32] = {0};
sprintf(date, "%d-%02d-%02d",(int)time->tm_year + 1900,(int)time->tm_mon + 1,(int)time->tm_mday);
return StringUtils::format("%s",date); #endif #if ( CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 ) struct tm* tm;
time_t timep;
time(timep); tm = localtime(&timep);
char date[32] = {0};
sprintf(date, "%d-%02d-%02d",(int)time->tm_year + 1900,(int)time->tm_mon + 1,(int)time->tm_mday);
return StringUtils::format("%s",date); #endif } std::string ChartDemoScene::getcurrMonthTime()
{
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) struct timeval now;
struct tm* time; gettimeofday(&now, NULL); time = localtime(&now.tv_sec);
int year = time->tm_year + 1900;
log("year = %d",year); char date1[24] = {0};
char date[8] = {0};
sprintf(date1, "%d:%02d:%02d:%02d:%02d:%02d",(int)time->tm_year + 1900,(int)time->tm_mon + 1,(int)time->tm_mday,time->tm_hour,time->tm_min,time->tm_sec);
sprintf(date, "%02d:%02d",time->tm_hour,time->tm_min);
return StringUtils::format("%s",date); #endif #if ( CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 ) struct tm* tm;
time_t timep;
time(timep); tm = localtime(&timep);
char date[32] = {0};
sprintf(date, "%d-%02d-%02d",(int)time->tm_year + 1900,(int)time->tm_mon + 1,(int)time->tm_mday);
return StringUtils::format("%s",date); #endif } void ChartDemoScene::menuCloseCallback(Ref* pSender)
{
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
MessageBox("You pressed the close button. Windows Store Apps do not implement a close button.","Alert");
return;
#endif Director::getInstance()->end(); #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
exit(0);
#endif
}
版权声明:本文博客原创文章,博客,未经同意,不得转载。
Cocos2d-x串算出Size方法的更多相关文章
- JUnit中测试异常抛出的方法
最近在做TWU关于TDD的作业,对JUnit中测试异常抛出的方法进行了一些学习和思考. 在进行单元测试的时候有的时候需要测试某一方法是否抛出了正确的异常.例如,我有一个方法,里面对一个List进行读取 ...
- 关于一道面试题【字符串 '1 + (5 - 2) * 3',怎么算出结果为10,'eval'除外】
最近徘徊在找工作和继续留任的纠结之中,在朋友的怂恿下去参加了一次面试,最后一道题目是: 写一个函数,输入一个字符串的运算式,返回计算之后的结果.例如这样的: '1 + (5 - 2) * 3',计算出 ...
- JavaScript BOM-11-BOM的核心-window对象; window对象的控制,弹出窗口方法; 超时调用; 间歇调用; location对象常用属性; 位置操作--location.reaplace,location.reload(); BOM中的history对象; Screen对象及其常用属性; Navigator对象;
JavaScript BOM 学习目标 1.掌握什么是BOM 2.掌握BOM的核心-window对象 3.掌握window对象的控制.弹出窗口方法 什么是bom BOM(browser object ...
- ConcurrentHashMap的size方法是线程安全的吗?
前言 之前在面试的过程中有被问到,ConcurrentHashMap的size方法是线程安全的吗? 这个问题,确实没有答好.这次来根据源码来了解一下,具体是怎么一个实现过程. ConcurrentHa ...
- 一次 Oracle 算出运算溢出问题 排查解决 (并非除数为零!)
前段时间 出现过这个问题,: 表中有一列为number类型 rec_recordlength (两个时间的间隔长度/秒) 部分数据 统计这个字段就会出现 "算出运算溢出" 错误,很 ...
- Java小知识--length,length(),size()方法详细介绍
Java中length,length(),size()区别 length属性:用于获取数组长度. eg: int ar[] = new int{1,2,3} /** * 数组用length属性取得长度 ...
- javascript基础程序(算出一个数的平方值、算出一个数的阶乘、输出!- !- !- !- !- -! -! -! -! -! 、函数三个数中的最大数)
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- ConcurrentHashmap中的size()方法简单解释
本文所有的源码都是基于JDK1.8 ConcurrentHashmap中的size()方法源码: public int size() { long n = sumCount(); return ((n ...
- [转]JAVA 根据经纬度算出附近的正方形的四个角的经纬度
csv文件转化为geojson文件中,涉及到路测图的打点生成,打点是由一个个正方形组成,而正方形是由四个点组成的,这四个点根据经纬度和范围生成,具体的实现代码是从网上找来的: /** * * @par ...
随机推荐
- debian网易163更新服务器 源
sudo vi /etc/apt/sources.list 加入如下内容即可: deb http://mirrors.163.com/debian/ jessie main non-free cont ...
- Axure RP中线条的设置
文章来源与网络 来自:非原型不设计
- JavaScript编程:浏览器对象模型BOM
4.浏览器对象模型BOM: document.body.offsetwidth可以获取浏览器宽度. Window对象: 窗口操作: 1.moveBy(dx,dy ...
- 最长公共子序列python实现
最长公共子序列是动态规划基本题目,以下依照动态规划基本步骤解出来. 1.找出最优解的性质,并刻划其结构特征 序列a共同拥有m个元素,序列b共同拥有n个元素,假设a[m-1]==b[n-1],那么a[: ...
- 解决ORA-28000: the account is locked
原文地址:http://yanwushu.sinaapp.com/ora-28000-the-account-is-locked/ 在oracle中.连续十次尝试登陆不成功.那么此账户将会被锁定(lo ...
- Deep Learning深入研究整理学习笔记五
Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...
- LEAVE LIST-PROCESSING和LEAVE TO LIST-PROCESSING事件的作用
START-OF-SELECTION. MESSAGE '屏幕报错' TYPE 'S' DISPLAY LIKE 'E'. LEAVE LIST-PROCESSING. 这样子的话 报错会返回包选择屏 ...
- 采用管道处理HTTP请求
采用管道处理HTTP请求 之所以称ASP.NET Core是一个Web开发平台,源于它具有一个极具扩展性的请求处理管道,我们可以通过这个管道的定制来满足各种场景下的HTTP处理需求.ASP. NET ...
- CWnd中PreCreateWindow、PreSubclassWindow、SubclassWindow的区别
http://blog.csdn.net/swimmer2000/archive/2007/10/30/1856213.aspx MFC(VC6.0)的CWnd及其子类中,有如下三个函数: / ...
- Boost的安装与使用(整整83篇)
http://www.cnblogs.com/lidabo/category/542245.html