![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++ MFC
若水微韧
专注于3d游戏开发,专注于C++11、STL、win32、mfc、OpenGL编程,开发属于自己3D的游戏
展开
-
基于对话框MFC按Enter键或者Ese退出的解决方法
基于对话框MFC按Enter键或者Ese退出的解决方法今天在用VC++6.0写数据库软件时。偶然发现单击回车键enter时,程序会突然退出。并且窗口开始时的默认确定按钮已经被我删除了,所以必要的措施必然做出,VC MFC 屏蔽ESC和ENTER键关闭对话框解决途径:在你的C...Dlg.h文件中添加重载函数PreTranslateMessage(MSG* pMsg)原创 2015-11-17 17:04:37 · 5979 阅读 · 0 评论 -
C语言中动态申请连续的二维数组
可以采用多申请一些指针,然后这一些指针分别指向后面数据区中对应的位置,如一个3*4的int类型数组,我们先申请大小为sizeof(int*) * 3 + 3 * 4 * sizeof(int)的一维数组设为arr。然后arr[0]存放指向arr + sizeof(int*) * 3这个位置的指针,arr[1]存放指向arr + sizeof(int*) * 3 + 4 * sizeof(int原创 2016-03-12 10:28:42 · 2081 阅读 · 1 评论 -
win7win8 64位汇编开发环境合集安装与设置
win7win8 64位汇编开发环境合集安装与设置下载 win7 win8 64位汇编开发环境.rar 下载地址打开DOSBox0.74-win32-installer.exe进行安装将debug.exe,edit.com,link.exe,masm.exe这几个程序复制到d:\myassembly文件夹下即可找到你安装的路径文件夹下,以记事本打开文件:DOSBox 0.74 Opt原创 2016-03-27 22:06:33 · 1973 阅读 · 0 评论 -
c++返回指针的函数应用于求素数的实例
函数体内,return语句的表达式的值必须是地址值这是c++返回指针的函数关键比如求素数的例子// test.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include #include using namespace std;int k;int* prime原创 2016-04-29 18:11:05 · 737 阅读 · 0 评论 -
函数指针的应用比较排序与冒泡排序指针完成
// 利用函数指针来实现比较排序 冒泡排序// test.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include using namespace std;void max_min(int* p, int m, int* max, int* min);void原创 2016-04-29 19:48:50 · 1073 阅读 · 0 评论 -
C++二进制文件读写简单操作
// WriteBinaryFile.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include #include int _tmain(int argc, _TCHAR* argv[]){ /* * 二进制文件写数据 * */ std::cout << "二进制文件写数据:\n"; std::ofstrea原创 2017-11-01 22:11:20 · 1226 阅读 · 2 评论 -
const std::string转换为const wchar_t* string
由const std::string转换为const wchar_t* stringc++代码:const std::string text = "汉语";std::wstring szDst; { int len = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)text.c_str(), -1, NULL, 0); wchar_t原创 2017-11-24 15:13:09 · 3721 阅读 · 0 评论