上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 56 下一页
摘要: // 返回 str 从前往后,第 count 次出现 ch 字符处的索引位置,失败返回 -1; protected static int IndexOf(string str, char ch, int count) { if (count < 1) { return -1; } int index 阅读全文
posted @ 2023-12-26 13:54 double64 阅读(317) 评论(0) 推荐(0)
摘要: ▲ 效果 头文件新增空间指针: private: CStatic* pBMP; BOOL CMFCApplicationBMPDlg::OnInitDialog() 里面初始化: // TODO: 在此添加额外的初始化代码 // 初始化字段 pBMP = (CStatic*)GetDlgItem(I 阅读全文
posted @ 2023-12-09 22:13 double64 阅读(217) 评论(0) 推荐(0)
摘要: ▲ 样式Demo 关联控件变量m_CList,在属性中将视图(View)设置成Report(报表)模式。 在BOOL CMFCApplication4LlisBoxDlg::OnInitDialog()初始化函数中添加测试代码: // TODO: 在此添加额外的初始化代码 //m_CList.Set 阅读全文
posted @ 2023-12-09 21:27 double64 阅读(81) 评论(0) 推荐(0)
摘要: .cpp头文件中需包括 using namespace System; //String^库文件 using namespace System::Runtime::InteropServices; //Marchal库文件 函数内容 char* c = "adsfdasf"; String^ str 阅读全文
posted @ 2023-12-08 16:18 double64 阅读(139) 评论(0) 推荐(0)
摘要: 托管C++ 这个项目名:CppCLI。 Animals.h #pragma once using namespace System; namespace Zoological { public ref class Animals { public: int GetLegs(); void SetLe 阅读全文
posted @ 2023-12-07 13:33 double64 阅读(103) 评论(0) 推荐(0)
摘要: 7)组合框(下拉框)CComboBox a) 获取内容:CComboBox::GetLBText 其它接口和 CListBox 的用法几乎一样 b) 属性设置 1) data: 设置内容,不同内容间同英文的分号“;”分隔 2) type // DropDown之类的选项,可编辑和不可编辑。 这个和上 阅读全文
posted @ 2023-12-03 18:56 double64 阅读(154) 评论(0) 推荐(0)
摘要: ▲ 增删改查 6)列表框CListBox a) 给列表框添加一个字符串 CListBox::AddString b) 选中列表列表框某一项,自动触发事件:LBN_SELCHANGE 1)获取当前选中项 CListBox::GetCurSel 2)获取指定位置的内容 CListBox::GetText 阅读全文
posted @ 2023-12-03 18:37 double64 阅读(379) 评论(0) 推荐(0)
摘要: 复选框 CheckBox 和 RadioButton 基本上一样,他们的类型其实都是 CButton。 BOOL CMFCApplication5Dlg::OnInitDialog() 初始化函数中: CheckRadioButton(IDC_CHECK1, IDC_CHECK3, IDC_CHEC 阅读全文
posted @ 2023-11-30 22:01 double64 阅读(870) 评论(0) 推荐(0)
摘要: 5)单选框、复选框 (特殊的CButton, 没有单选框, 复选框类型 ) a) 单选框 1) 属性设置:顺序排放 Ctrl+D 查看 2) 同组第一个按钮 Group 设置为 TRUE 3) 初始化单选框 CWnd::CheckRadioButton 4) 按钮是否按下 CWnd::IsDlgBu 阅读全文
posted @ 2023-11-28 00:06 double64 阅读(1391) 评论(0) 推荐(0)
摘要: ▲ 对话框中的蓝色参考虚线 ▲ 选择"格式"--"切换辅助线" 阅读全文
posted @ 2023-11-27 16:37 double64 阅读(252) 评论(0) 推荐(0)
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 56 下一页