avatar
文章
366
标签
89
分类
53

Home
Archives
Tags
Categories
Link
张拓的博客
搜索
Home
Archives
Tags
Categories
Link

张拓的博客

MFC中透明贴图
发表于2014-11-29|c++mfc
12345678910111213141516171819bool Draw(CPaintDC& dc){ int posx = GetAbsoluteLeft(); int posy = GetAbsoluteTop(); HDC MemDC;//一个环境设备 MemDC =CreateCompatibleDC(0);//得到一个兼容设备句柄 CImage image; image.Load("res//Arrow.bmp"); int w = image.GetWidth(); int h = image.GetHeight(); HBITMAP hbmp = image.Detach(); SelectObject(MemDC, hbmp);//把图片选择设备 // 设置RGB(255, 255, 255)为透明其它不透明 TransparentBlt(dc.m_hDC, posx, posy-14, GetFrameWidth()*2, GetFrameHeight( ...
lua实现的循环背景
发表于2014-10-21|cocos
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748local GameBackGround = class("GameBackGround", function() return display.newLayer("GameBackGround")end)GameBackGround.bk_ = {}GameBackGround.bkSize_ = 0function GameBackGround:ctor() self.bk_[0] = display.newSprite("main_bg_grass_left.jpg" , display.cx, display.cy) self.bk_[0]:setAnchorPoint(0,0) self.bk_[0]:setPosition(0,0) self:addChild(self.bk_[0]) ...
quick-lua创建骨骼动画
发表于2014-10-20|cocos
1234567891011121314151617181920local Skeleton = class("Skeleton", function() return display.newSprite()end)function Skeleton:ctor() -- 加载骨骼资源 ccs.ArmatureDataManager:getInstance():addArmatureFileInfo("cyborg.png", "cyborg.plist", "cyborg.xml") -- addArmatureFileInfo("png名","plist名","xml名字") -- 创建 local armature3 = ccs.Armature:create("cyborg") -- 骨骼名 armature3:getAnimation():play("run&q ...
lua模拟消息循环
发表于2014-10-17|lua
lua模拟消息循环 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122--消息循环 单例--[[ --使用方法 local message = require("scripts.app.Node.MessageManager") message:PostMessage(message) num = time / dt message:PostDelayMessage(message, num) --检测并发送消息 message:UpdateManager_(dt)] ...
Sql触发器
发表于2014-08-11|sql
12345678910create or replace trigger _trigger_name before insert or update on TABLE_NAME for each rowdeclare -- local variables herebegin :new.ID := SYS_GUID;end _trigger_name; -- 插入或更新数据后修改ID
写入程序数据库“.pdb”时出错
发表于2014-07-21|vs
LINK : fatal error LNK1201: 写入程序数据库“F:\pb\proj.win32\Debug.win32\demo.pdb”时出错;请检查是否是磁盘空间不足、路径无效或权限不够调试->属性->c/c++修改调试信息格式为C7兼容。
cocos2d-x3.0新特性,与2.0的差别
发表于2014-05-15|cocos
cocos2d-x3.0新特性,与2.0的差别1234// cocos2d-x3.0发布说明https://github.com/fusijie/Cocos2d-x3.0-Release-Note// cocos2d-x3.0文档http://www.cocos2d-x.org/reference/native-cpp/V3.0/index.html
cocos2d-x移动淡出
发表于2014-05-03|cocos
123456789// cocos2d-x 2.2.3CCLabelTTF* pLabelTTF = CCLabelTTF::create( "abcdefghijklmn", "Arial", 40 );pLabelTTF->setPosition(ccp( 240, 20 ));pLabelTTF->setColor(ccc3(240, 222, 171));this->addChild(pLabelTTF);CCMoveBy* move = CCMoveBy::create(2, ccp(0,200)); // 相对移动动作CCFadeOut* fadeOut = CCFadeOut::create(2.0f); // 淡出动作CCFiniteTimeAction* fadeOutAct = CCSpawn::create(fadeOut, move,NULL); // 移动淡出同时执行pLabelTTF->runAction(fadeOutAct);
cocos2d-x文字移动
发表于2014-05-03|cocos
1234567// cocos2d-x文字移动CCLabelTTF* pLabelTTF = CCLabelTTF::create( "dcasfdsafdsa", "Arial", 40 );pLabelTTF->setPosition(ccp( 250, 20 ));pLabelTTF->setColor(ccc3(240, 222, 171));CCMoveTo *move = CCMoveTo::create(2.0f, ccp(0, 250));this->addChild(pLabelTTF);this->runAction(move);
水桶问题,所选水的体积之和刚好能盛满大桶
发表于2014-04-27|c++algorithm
有一个大水桶,能盛放的水总容积为V,设有N个小桶的水,其容积分别为w1,w2,…,wn,希望从N个小桶中选择若干桶水倒入大桶中,所选水的体积之和刚好能盛满大桶,即水的体积之和等于V。 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081#include <iiostream> using namespace std;// 明年十八岁const int N = 10;int W[N] = {0}; // 标记int V[N] = {0}; // 小桶装的水体积// 计算 v总体积,i小桶数量bool Func(int v, int i);// 打印输出void OutPut();// 初始化标记void InitW();// 初始化所有小水桶装水的体积void InitV(); in ...
1…303132…37
avatar
张拓
多情自古空余恨,好梦由来最易醒
文章
366
标签
89
分类
53
Follow Me
公告
每天都有一个好心情
最新文章
windows编译libtorrent
windows编译libtorrent2024-05-23
windows编译boost
windows编译boost2024-05-08
vscode远程调试linux
vscode远程调试linux2023-12-21
linux服务检查进程
linux服务检查进程2023-12-01
ubuntu配置vnc服务
ubuntu配置vnc服务2023-11-03
分类
  • algorithm81
    • maze1
    • search34
    • sort33
  • aws7
  • boost7
  • build2
  • c++110
标签
database pygame samb odbc url cocos ocx rejson libzip samba 文本转语音 vs hex search thread win32 lua ffmpeg shared memory asio ssh cpp redis python TortriseGit decode quota uac .map qemu sql wordpress bitmap 杂 livecd py ustar ubuntu proxy dbg
归档
  • 五月 20242
  • 十二月 20232
  • 十一月 20231
  • 九月 20232
  • 八月 20236
  • 七月 202310
  • 六月 20234
  • 五月 202310
网站资讯
文章数目 :
366
本站访客数 :
本站总访问量 :
最后更新时间 :
©2020 - 2025 By 张拓
框架 Hexo|主题 Butterfly
京ICP备2022021138号-1
搜索
数据库加载中