自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(102)
  • 收藏
  • 关注

转载 WP开发加载图片及文字Resource/Content说明

来自:http://www.cnblogs.com/jx0906/archive/2013/05/11/3073522.html在进行wp开发时,要注意一下图片的加载形式。在wp7中,资源文件主要有三种BuildAction属性,Resource/Content/None。默认情况下会选择Resource的方式加载。我刚开始学wp开发的时候,碰到了大多数人都会碰到的问题:为什么

2013-07-09 21:55:02 601

原创 客户端 服务端公共部分

来自:http://www.codeproject.com/Articles/412511/Simple-client-server-network-using-Cplusplus-and-W数据包:#define MAX_PACKET_SIZE 1024enum PacketTypes { INIT_CONNECTION = 0, ACTION_EVENT = 1,

2013-05-05 20:41:05 574

原创 服务端部分

来自:http://www.codeproject.com/Articles/412511/Simple-client-server-network-using-Cplusplus-and-W包含四个文件:ServerNetwork.h  //对服务端socket的初始化,数据收发ServerNetwork.cppServerGame.h     //对数据收发的处理Serve

2013-05-05 20:35:08 556

原创 客户端部分

来自:http://www.codeproject.com/Articles/412511/Simple-client-server-network-using-Cplusplus-and-W这里做了一些修改,当然还需做进一步完善。包含四个文件:ClientNetwork.h  //客户端socket的初始化,数据收发ClientNetwork.cppClientGame.

2013-05-05 20:09:55 581

原创 simple_network说明

来自:http://www.codeproject.com/Articles/412511/Simple-client-server-network-using-Cplusplus-and-WSimple client-server network using C++ and Windows Winsock网络通信

2013-05-05 19:51:28 473

原创 Part1:CException

#ifndef _EXCEPTION_H_#define _EXCEPTION_H_#include #include class CException : public std::exception{public: const char* what() const { return m_strMessage.c_str(); } CException(const std:

2013-04-27 16:30:04 465

原创 Part1:win32 程序框架

来自:http://www.codeproject.com/Articles/27219/TetroGL-An-OpenGL-Game-Tutorial-in-C-for-Win32-Plamain.cpp#include #include "Exception.h"#include "Application.h"int WINAPI WinMain(HINSTANCE I

2013-04-27 16:26:54 492

原创 Part1:Project Settings

来自:http://www.codeproject.com/Articles/27219/TetroGL-An-OpenGL-Game-Tutorial-in-C-for-Win32-PlaWe will start by creating a new project and configuring the different options. The tutorial project

2013-04-27 16:18:25 501

原创 Part2:Organizing the Files与第三方库的使用方法

来自:http://www.codeproject.com/Articles/28608/TetroGL-An-OpenGL-Game-Tutorial-in-C-for-Win32-Pla目录1、Organizing the Files2、第三方库的使用方法1、Organizing the FilesWe first start by organizing o

2013-04-27 16:14:56 611

原创 Part2:CSmartPtr

Part2中的智能指针:#ifndef _SMARTPTR_H_#define _SMARTPTR_H_#include #ifndef NULL#define NULL 0#endif// A template class that provides smart pointer functionality./* The principle is that eac

2013-04-27 15:56:16 472

原创 Part2:Example

来自:http://www.codeproject.com/Articles/28608/TetroGL-An-OpenGL-Game-Tutorial-in-C-for-Win32-PlaAfter all those explanations, it is time for a concrete example to see how we will use all those

2013-04-27 15:38:32 441

原创 Part2:The CImage Class & Displaying Animations

目录:1、The CImage Class 2、Displaying Animations1、The CImage ClassLet's now look at how this texture is used by the CImage class. As we saw earlier, the CTexture is not manipulated di

2013-04-27 14:50:58 850

原创 Part2:Resource Management/资源管理

来自:http://www.codeproject.com/Articles/28608/TetroGL-An-OpenGL-Game-Tutorial-in-C-for-Win32-PlaNow that everything is set-up correctly to use DevIL, we are ready to load some images and display them

2013-04-27 11:42:53 557

转载 stringstream的用法

来自:http://www.cppblog.com/Sandywin/archive/2007/07/13/27984.html【本文来自】http://www.builder.com.cn/2003/0304/83250.shtmlhttp://www.cppblog.com/alantop/archive/2007/07/10/27823.html使用stringstr

2013-04-27 11:32:16 407

原创 Part3:细节 知识点

目录1、排序2、使用stringstream对象简化类型转换1、排序CHighScoreState类中的m_vecHighScores成员 // High-score data: score and player name. struct HighScoreData { std::string strPlayer; ULONG ulScore; /

2013-04-27 11:31:02 422

转载 详细解说 STL 排序(Sort)

来自:http://www.cppblog.com/mzty/archive/2005/12/15/1770.html详细解说 STL 排序(Sort)详细解说 STL 排序(Sort) 作者Winter详细解说 STL 排序(Sort)0 前言: STL,为什么你必须掌握1 STL提供的Sort 算法1.1 所有sort算法介绍1.2

2013-04-27 11:12:26 379

原创 Part3:The High-Scores State

来自:http://www.codeproject.com/Articles/30775/TetroGL-An-OpenGL-Game-Tutorial-in-C-for-Win32-pla目录:1、The High-Scores State2、简单使用1、The High-Scores StateThis state is responsible to dis

2013-04-27 10:27:18 547

原创 Part3:CTetrad_Z 、CTetradFactory及CComboControl

目录:1、CTetrad_Z类具体实现2、CTetradFactory类的实现3、CComboControl类的实现1、CTetrad_Z类具体实现      CTetrad_Z类是方块中的一种,继承自CTetrad类。其它的实现类似 class CTetrad_Z : public CTetrad{public: CTetrad_Z(CBlo

2013-04-26 22:05:55 564

转载 游戏后台的快速开发

来自:http://software.intel.com/zh-cn/blogs/2013/04/08/?utm_campaign=CSDN&utm_source=intel.csdn.net&utm_medium=Link&utm_content=others-%20youxi很多人都痴迷于游戏,而做为程序开发人员,喜欢自己做游戏的自然也不在少数。但开发一个有点规模的游戏,除了主要的游戏

2013-04-23 11:01:34 440

原创 Part3:The Play State

来自:http://www.codeproject.com/Articles/30775/TetroGL-An-OpenGL-Game-Tutorial-in-C-for-Win32-pla目录:1、The Play State2、补充    简单使用1、The Play StateThis state is the most complicated one, because

2013-04-23 09:20:32 483

原创 Part3:The Menu State/Game Example

来自:http://www.codeproject.com/Articles/30775/TetroGL-An-OpenGL-Game-Tutorial-in-C-for-Win32-pla目录:1、Game Example说明2、The Menu State3、补充 简单使用1、Game Example说明We have now covered every

2013-04-22 20:24:27 462

原创 Part3:Handling the States of your Game/游戏状态处理

来自:http://www.codeproject.com/Articles/30775/TetroGL-An-OpenGL-Game-Tutorial-in-C-for-Win32-pla目录1、Handling the States of your Game2、补充  简单使用1、Handling the States of your GameIn almost

2013-04-22 19:07:55 555

原创 Part3:Drawing Text /用OpenGL 绘制文本

来自:http://www.codeproject.com/Articles/30775/TetroGL-An-OpenGL-Game-Tutorial-in-C-for-Win32-pla1、Drawing Text  CGameFont 类2、CGameFont 类的辅助CTextControl类3、如何输出汉字1、Drawing Text  CGameFont 类

2013-04-22 16:39:09 1164

原创 TetroGL说明

本专题来自CodeProject 的TetroGL: An OpenGL Game Tutorial in C++ for Win32 platforms相关文章是对此项目的学习整理地址:http://www.codeproject.com/Articles/27219/TetroGL-An-OpenGL-Game-Tutorial-in-C-for-Win32-Pla

2013-04-22 16:31:11 612

原创 Opengl 相关

void CMainWindow::InitGL(){    glEnable(GL_TEXTURE_2D); // Enable 2D texturing 启用二维文理    glShadeModel(GL_FLAT);   // Choose a smooth shading model 单色(相对于渐变色)    glClearColor(0.0, 0.0, 0.0, 0.0

2013-04-19 11:29:29 504

转载 Visual Studio中的文件类型(sln vcproj suo user ncb)

来自:http://blog.csdn.net/huapeng_guo/article/details/7692640Net解决方案下 .sln文件和.suo文件的解释:When a Web site is created, a solution file (.sln) and a hidden solution user options file (.suo) are creat

2013-04-18 10:31:27 510

转载 关于VCPROJ文件的说明

来自:http://blog.csdn.net/hanshuangfly/article/details/6580356vcproj文件是vs08或vs05的工程文件,而sln文件为vs08或vs05的的项目文件。vcproj的具体格式为xml格式,其中包含三个主要的节:platform,configuration,Filesplatform:描述的只是x6

2013-04-18 10:22:36 593

转载 MsgWaitForMultipleObjectsEx

来自:http://cailongyi.blog.163.com/blog/static/9520850201006104930832/函数功能描述:阻塞时仍可以响应消息返回的线程同步API函数原型 DWORD MsgWaitForMultipleObjectsEx(DWORD nCount, // 句柄数组中句柄数目LPHANDLE pHand

2013-04-16 18:59:21 4023

转载 VS2005+opengl环境配置

来自:http://wenku.baidu.com/view/c5168155f01dc281e53af0d1.html说起编程作图,大概还有很多人想起TC的#include 吧?但是各位是否想过,那些画面绚丽的PC游戏是如何编写出来的?就靠TC那可怜的640*480分辨率、16色来做吗?显然是不行的。本帖的目的是让大家放弃TC的老旧图形接口,让大家接触一些新事物。Open

2013-04-16 17:14:34 523

转载 MFC上显示GIF图片(使用 GIF Animation Control控件)

来自:http://blog.csdn.net/silence1214/article/details/5987877昨晚到现在一直寻思着在MFC的Dialog上显示个GIF图片,无奈如此的有难度,经过寻找找到个好用的控件,拿来用了,但是官网给的不是很好使。也缺乏一个文件,我这里一起整理出来了。说个过程1:一共需要5个文件,其中3个h,2个cpp文件,如图下载地址我随后补充上来

2013-04-14 12:43:11 1631

原创 cfiledialog打开多个文件

代码片段//浏览void CEditImageDlg::OnBnClickedBrowser(){ CString str; str=_T("图片文件 (*.jpeg;*.png;*.jpg;*.gif;*.bmp)|*.jpeg;*.png;*.jpg;*.gif;*.bmp|"); CFileDialog fileDlg(TRUE,NULL, NULL,OFN_E

2013-04-11 11:16:44 587

原创 用_beginthreadex创建线程

http://jialinwang.blog.163.com/blog/static/1014026912009415113716375/用_beginthreadex创建线程_beginthreadex参数说明  unsigned long _beginthreadex( void *security, unsignedstack_size, unsigned ( __std

2013-03-28 09:16:50 610

转载 进程内多线程同步CRITICAL_SECTION

来自:http://baike.baidu.com/view/1976662.htm简介不论是硬件临界资源,还是软件临界资源,多个线程必须互斥地对它进行访问。每个线程中访问临界资源的那段代码称为临界区(Critical Section)。 每个线程中访问临界资源的那段程序称为临界区(Critical Section)(临界资源是一次仅允许一个线程使用的共享资源)。每次只准许

2013-03-27 15:07:50 618

原创 c字符串处理

以下是对一些字符处理函数的整理:1、strcat()2、strcpy()1、strcat()/****char *strcat(dst, src) - concatenate (append) one string to another**Purpose:* Concatenates src onto the end of dest. Assumes en

2013-03-27 15:03:21 424

原创 线程中拷贝文件前没有sleep,拷贝失败

时间:20130326功能:数据库拷贝描述:线程中拷贝文件前没有sleep,拷贝失败代码如下:/* *接收报文线程 */void CRecvThread::Run(){ //... Sleep(500); //如果没有这句话,后边的拷贝会失败 BackupDB(); //数据库备份 //...}原因:与是否sleep()没有关系

2013-03-26 19:26:24 407

原创 表情预览中,清空预览区域的背景

时间:2013.03.25 周一功能:表情预览问题描述:如果所预览表情的大小小于预览区域的话,除了显示预览的表情,空白的位置还会显示其他的表情解决方法:新增一个static控件,用OnctlColor()把这个控件的背景刷成需要的颜色。在显示预览表情时,先显示这个static控件,然后再它的上面再显示预览的表情。显示和隐藏都是一起的。//.h CMyPicture

2013-03-25 11:06:53 469

转载 OnCtlColor

来自:http://6460646.blog.163.com/blog/static/2777987520094693158356/在MFC类库提供了CWnd::OnCtlColor函数,在工作框架的子窗口被重画时将调用该成员函数.因此可以重载WM_CTLCOLOR消息的响应函数.此函数的原型:  afx_msg HBRUSH OnCtlColor(CDC *pDC,CWnd *pWn

2013-03-25 10:53:03 402

原创 内存设备绘图 BitBlt的使用

代码:对话框的OnPaint()函数中:CPaintDC dc(this); CDC memDC;CBitmap memBmp;CRect wndRect;this->GetClientRect(wndRect);memDC.CreateCompatibleDC(&dc);memBmp.CreateCompatibleBitmap(&dc, wndRect.Width(),

2013-03-22 16:41:30 1649

转载 程序员学习能力提升三要素

来自:http://www.programmer.com.cn/14857/ 文/尹华山IT技术的发展日新月异,新技术层出不穷,具有良好的学习能力,能及时获取新知识、随时补充和丰富自己,已成为程序员职业发展的核心竞争力。本文中,作者结合多年的学习经验总结出了提高程序员学习能力的三个要点。众所周知,现在是一个知识爆炸的时代,知识更新非常快。据测算,一个大学毕业生所学到的知识,在毕

2013-03-21 08:58:01 401

转载 CFileDialog的用法简介

来自:http://blog.csdn.net/demok2010/article/details/5957523CFileDialog文件选择对话框的使用:首先构造一个对象并提供相应的参数,构造函数原型如下: CFileDialog::CFileDialog( BOOL bOpenFileDialog, LPCTSTR lpszDefExt = NULL, LPCTSTR lpszF

2013-03-20 11:17:04 339

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除