02 2024 档案

摘要:// 反射判断是否位某个类型 public bool IsSubclassOf(this Type type, Type baseType) { // 如果type不是null并且baseType是一个类(非接口) if (type != null && baseType.IsClass) { re 阅读全文
posted @ 2024-02-27 20:17 double64 阅读(86) 评论(0) 推荐(0) 编辑
摘要:SetWindowText(_T("MFC 测试")); // 设置窗体标题 CString str; GetWindowText(str); // 获取窗体标题内容 /********************************************************/ CString 阅读全文
posted @ 2024-02-26 13:34 double64 阅读(14) 评论(0) 推荐(0) 编辑
摘要:浅拷贝 静态数组的空间体现深拷贝的效果 #include <iostream> #include <string> using namespace std; #define SEX_SIZE 10 class Student { public: Student(string name) { Age 阅读全文
posted @ 2024-02-24 09:54 double64 阅读(12) 评论(0) 推荐(0) 编辑
摘要:C#: static void Main(string[] args) { bool result = true; result &= Func(); result &= Func(); result &= Func(); Console.WriteLine("&= 最后结果:{0}\n", res 阅读全文
posted @ 2024-02-23 08:55 double64 阅读(5) 评论(0) 推荐(0) 编辑
摘要:成员变量关联: private: CMFCButton m_btnColorTest; CMFCButton* m_pBtnColor; // CMFCAppColorDlg 对话框 #define DELETE(ptr) do{if (ptr) {delete ptr; ptr = nullptr 阅读全文
posted @ 2024-02-19 19:22 double64 阅读(198) 评论(0) 推荐(0) 编辑
摘要:#include "afxwin.h" #include <iostream> using namespace std; int main() { CString cs = _T("西游记"); AfxMessageBox(_T("CString:") + cs); // CString 转 ACS 阅读全文
posted @ 2024-02-19 14:23 double64 阅读(166) 评论(0) 推荐(0) 编辑
摘要:#include <iostream> using namespace std; typedef int INT, * PINT; typedef int* PINT32, INT32; int main() { int* p, a; a = 10; p = &a; cout << *p << en 阅读全文
posted @ 2024-02-19 13:29 double64 阅读(18) 评论(0) 推荐(0) 编辑
摘要:▲ Demo 示例 新建基于对话框的 Demo程序。 头文件: // 自定义数据类型,用来测试消息数据传递 typedef struct tagStudent { CString Name; int Age; }Student_t; // Dlg header public: afx_msg voi 阅读全文
posted @ 2024-02-05 17:18 double64 阅读(72) 评论(0) 推荐(0) 编辑
摘要:#include "Windows.h" #include <stdlib.h> #include <stdio.h> DWORD WINAPI ThreadFunc(LPVOID param) { printf("启动线程\n"); return 0; } int main() { DWORD t 阅读全文
posted @ 2024-02-05 13:10 double64 阅读(12) 评论(0) 推荐(0) 编辑
摘要:测试类: #pragma once ref class Hello { public: Hello(); ~Hello(); !Hello(); }; /***************/ #include "Hello.h" Hello::Hello() { System::Console::Wri 阅读全文
posted @ 2024-02-04 22:40 double64 阅读(97) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示