- 博客(17)
- 收藏
- 关注
原创 Swift SpriteKit 中使用 FontAwesome
Swift SpriteKit 中使用 FontAwesome1. FontAwesome.otf加入xCode直接从Finder中把fontAwesome.otf文件拖入xCode项目下。2. Copy Bundle Resource在project->build里面,设置copy bundle resource。 解码。注意 char * 与 String 的区别在 “\0”inline BYTE toHex(const BYTE &x){ return x > 9 ? x + 55: x + 48;}CString CMyTools::urlEncoding( unsigned char * sIn,
2011-11-03 11:47:18
787
原创 GB2312 与 UTF8 互转
CString CMyTools::G2U(CString gb2312){ int len = MultiByteToWideChar(CP_ACP, 0, gb2312, -1, NULL, 0); wchar_t* wstr = new wchar_t[len+1]; memset(wstr, 0, len+1); MultiByteToWideC
2011-11-03 11:45:20
1089
原创 JQuery实现图片放大的动态菜单效果
div, img, ul, li { margin: 0; padding: 0;}.head img { border: 0 none; vertical-align: top; position:absolute; width:100px; height:75px;}ul, li { list-style: none ou
2011-11-03 11:42:55
450
原创 使用MySQLConnector/C++连接MySQL数据库
sql::ResultSet * CMyTools::ListAll(void){ using namespace sql; mysql::MySQL_Driver::Driver * driver; Connection * con; Statement * state; ResultSet * result; try { driver = sql::mysql:
2011-11-03 11:36:05
651
原创 单文档应用程序切换视图
BOOL CMainFrame::ReplaceView(CRuntimeClass * pViewClass){ CCreateContext context; CView * pCurrentView; // If no active view for the frame, return FALSE because this // function retr
2011-11-03 11:33:47
374
原创 ANSI 与 UTF8 互转
CString CMyTools::A2U(const char * s){ CString wStr; int nLen = ::MultiByteToWideChar( CP_UTF8, 0, s, -1, NULL,0); wchar_t* p = wStr.GetBuffer( nLen+10 ); wmemset( p, 0, nLen+10 ); nLen =
2011-11-03 11:28:58
370
原创 用CMarkup操作XML
<br />CMarkup的开源代码在firstobject.<br /> <br />主要的一些方法:<br />.load(_PATH_) //载入xml文件<br />.intoElem() //进入元素<br />.FindElem() //查找<br /> <br />例子:<br /> CMarkup xml; xml.Load(XMLPATH); CList<CString,CString&> BSList; CList<CString,CString&> BSFile; wh
2010-09-15 11:46:00
402
原创 把线程写进类中
<br />首先一个非常简单的多线程程序,基本上类似如下情况:<br />#include "stdafx.h"#include <Windows.h>#include <iostream>DWORD WINAPI MyCallBack(LPVOID lpParam);int _tmain(int argc, _TCHAR* argv[]){ std::cout<<"Main Thread online."<<std::endl; HANDLE m_hThread1 = Crea
2010-09-01 14:27:00
362
原创 转战csdn
<br /> 忙东忙西的,最后还是折腾到C++了。现在说人生或许太早,但是十年最后回到C++,也算是画个小圆圈。从头开始吧。在csdn这块扎个根,也顺便把从前的那些东西整理整理,搬过来好了。
2010-08-20 09:23:00
319
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人