- 博客(13)
- 资源 (1)
- 收藏
- 关注
原创 继续更新,关于MFC琐碎思索
1、vs2008中,strcpy(lf.lfFaceName,"Times New Roman"); 报错,原因:'strcpy' : cannot convert parameter 1 from 'WCHAR [32]' to 'char *'。修改方式:wcscpy(l
2011-09-14 22:19:53
848
原创 VC 直接在界面上添加文字
渐变字: // 获得窗口的客户区设备上下文句柄 CClientDC dc(this); // 更改当前字体 LOGFONT lf; dc.GetCurrentFont()->GetLogF
2011-09-14 22:03:27
2764
原创 VC中外部函数如何获得对话框成员变量
今天为柚纸(老婆)创作一个软件,我发现我不但是个程序员,还是一个不错的设计师呀!哈哈(自夸一下)。在用定时器的时候,回调函数需要调用对话框中的成员变量,但回调函数不在对话框类中是全局的,于是开始琢磨怎么实现外部对对话框中的成员调用,大家都知道一个对话框是在theApp对象中声
2011-09-14 16:22:15
3702
原创 CButtonST的用法
1、将BCMenu.cpp,BCMenu.h,BtnST.h,BtnST.cpp四个文件拷贝到工程中。2、vs2008项目-》添加现有项,将上面四个文件包含在工程里。3、添加头文件:#include "BtnST.h" 4、新建CButton,找到该button的I
2011-09-14 14:58:41
1358
原创 获得系统时间
#include #include using namespace std;int main(){ SYSTEMTIME stime; GetLocalTime( &stime ); cout << stime.wYear;
2011-09-13 23:18:03
655
原创 VC 添加皮肤库
Skin++ 0.1.3 使用指南 一.加载Skin++ 0.将SkinPlusPlusDLL.lib, SkinPlusDLL.dll,SkinPlusPlus.h,XPCorona.ssk都复制到当前目录 1.在(VC7) "项目-> 属性-> 链
2011-09-13 22:18:57
973
原创 无意中发现了 跪求牛人前来解释
#include using namespace std;int main(){ int n = 5; int a[n]; a[1] = 7; cout<< a[1] << endl; return 0;}
2011-09-10 17:13:42
1433
1
原创 指针与数组的区别,以及指针的空间开辟问题
#include using namespace std;int main(){ char* p = "wanglibao"; char* a = new char[10]; // p[0] = 'e'; a[0] = '
2011-09-07 22:13:29
1877
原创 认识联合体C++
#include using namespace std;union { int i; int c; char x[2];}a;int main(){ cout << "Hello world!" << endl
2011-09-07 12:50:31
945
原创 C++定时器的使用
一段关于定时器的程序 // ThunderFind.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include #include "map.h"#include using names
2011-09-06 23:03:11
6357
原创 C++笔试常见题目
C++笔试常见题目提前说明一点,题目来在网络,答案仅供参考,如有同学觉得哪道题目有异议,欢迎讨论!1.是不是一个父类写了一个virtual 函数,如果子类覆盖它的函数不加virtual ,也能实现多态?virtual修饰符会被隐形继承的。private 也被集成,只事
2011-09-06 21:50:14
1285
1
原创 计时器 每个一秒输出一次
#include #include #include using namespace std;int main(){ while(1) { Sleep(1000); cout << "ddd"
2011-09-06 15:16:48
1391
原创 获得随机数
#include #include #include using namespace std;int main(){ int posX,posY; srand((unsigned)time(NULL)); for(int i = 0
2011-09-06 14:38:49
688
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人