上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 164 下一页
摘要: // GetActiveWindowDlg.cpp: 实现文件 // #include "pch.h" #include "framework.h" #include "GetActiveWindow.h" #include "GetActiveWindowDlg.h" #include "afxd 阅读全文
posted @ 2023-04-12 21:35 天子骄龙 阅读(146) 评论(0) 推荐(0)
摘要: CString str; int i = 10; ASSERT(i==10); //条件为真继续执行,条件为假中断执行 str.Format(_T("i=10为真")); ::OutputDebugString(str); //ASSERT(i < 10); str.Format(_T("i<10为 阅读全文
posted @ 2023-04-12 21:10 天子骄龙 阅读(57) 评论(0) 推荐(0)
摘要: HWND hWnd = NULL; UINT func1(LPVOID pParam) //线程函数 { BOOL bb; for (int i = 0; i < 1000; i++) { bb = IsIconic(hWnd);//判断窗口是否最小化 /* 参数1:HWND hWnd 窗口句柄 返 阅读全文
posted @ 2023-04-12 17:29 天子骄龙 阅读(173) 评论(0) 推荐(0)
摘要: CWinApp* pwin = AfxGetApp();//获取当前应用进程的指针 CWnd* pWnd = pwin->GetMainWnd();//获取主窗口指针 CGetMainWndDlg* pDlg = (CGetMainWndDlg*)pWnd; //主窗口指针转化成对话框类指针 pDl 阅读全文
posted @ 2023-04-12 11:47 天子骄龙 阅读(167) 评论(0) 推荐(0)
摘要: HANDLE handle = NULL; HANDLE handle1 = NULL; pwin = AfxGetApp(); handle=AfxGetApp()->m_pMainWnd;//获得主线程的句柄 CString str; str.Format(_T("主线程句柄=%d\r\n"), 阅读全文
posted @ 2023-04-12 07:56 天子骄龙 阅读(133) 评论(0) 推荐(0)
摘要: CWinApp* pwin = NULL; void CAfxGetAppDlg::OnBnClickedButton1() { // TODO: 在此添加控件通知处理程序代码 pwin= AfxGetApp();//获取当前应用进程的指针 //确切的说是获取由CWinApp派生出类的对象 //通过 阅读全文
posted @ 2023-04-12 07:08 天子骄龙 阅读(105) 评论(0) 推荐(0)
摘要: 方法一:使用注册消息 示例一: // fasongDlg.cpp: 实现文件 // #include "pch.h" #include "framework.h" #include "fasong.h" #include "fasongDlg.h" #include "afxdialogex.h" 阅读全文
posted @ 2023-04-11 19:51 天子骄龙 阅读(430) 评论(0) 推荐(0)
摘要: UINT showMyAppMsg = RegisterWindowMessage(_T("MYAPP_SHOW"));//给窗口增加一个消息 /* 定义一个新的窗口消息,保证该消息在系统范围内是唯一的。通常调用SendMessage或者PostMessage函数时,可以使用该函数返回的消息值 参数 阅读全文
posted @ 2023-04-11 18:46 天子骄龙 阅读(110) 评论(0) 推荐(0)
摘要: // gongxianDlg.cpp: 实现文件 // #include "pch.h" #include "framework.h" #include "gongxian.h" #include "gongxianDlg.h" #include "afxdialogex.h" #ifdef _DE 阅读全文
posted @ 2023-04-11 14:03 天子骄龙 阅读(97) 评论(0) 推荐(0)
摘要: HDC hdc = ::GetDC(m_hWnd); RECT rect = { 10,10,50,100 }; HBRUSH hbr; hbr = CreateSolidBrush(RGB(255, 0, 0)); int f = FrameRect(hdc, &rect, hbr);//绘制矩形 阅读全文
posted @ 2023-04-10 17:49 天子骄龙 阅读(317) 评论(0) 推荐(0)
上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 164 下一页