欢迎来到我的博客https://www.cnblogs.com/veis/

https://www.cnblogs.com/veis/p/14182037.html

上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页
摘要: 1.源代码 #include "stack.h" /** * [CreateStack 创建一个栈结构] * @param p [要创建的栈类型指针] * @param nSize [栈大小] */ p_stack CreateStack(int nSize) { p_stack ps = mall 阅读全文
posted @ 2020-05-18 18:37 veis 阅读(356) 评论(0) 推荐(0)
摘要: 再谈C语言宏定义 [toc] 简单的宏定义 1. 简单宏定义格式 关键字 define 标识符 需要符合C语言变量命名标准 替换列表 是一系列的C语言记号,包括标识符、关键字、数字、字符常量、字符串字面量、运算符和标点符号等(注意替换列表可以为空,即简单宏可以只包含[关键字]和[标识符])。 2. 阅读全文
posted @ 2020-05-17 23:51 veis 阅读(772) 评论(0) 推荐(0)
摘要: #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #include <string.h> #include <conio.h> typedef enum _BOOL_ { FALSE = 0, TRUE } 阅读全文
posted @ 2020-05-13 00:34 veis 阅读(1124) 评论(0) 推荐(0)
摘要: 1、全局变量 HHOOK g_hook; HINSTANCE g_hInstance; HWND g_hWnd; 2、 安装钩子 g_hInstance = NULL; g_hWnd = m_hWnd; g_hook = SetWindowsHookEx(WH_MOUSE_LL, (HOOKPROC 阅读全文
posted @ 2020-05-11 17:21 veis 阅读(873) 评论(0) 推荐(0)
摘要: 1.什么是内存DC? 要使应用程序能够将输出放在内存中,而不是将其发送到实际的设备,请为位图操作使用一个称为内存设备上下文的特殊设备上下文。内存DC使系统能够将内存的一部分作为虚拟设备处理。它是内存中的一个位数组,应用程序可以临时使用它来存储在普通绘图表面上创建的位图的颜色数据。由于位图与设备兼容, 阅读全文
posted @ 2020-05-10 14:42 veis 阅读(471) 评论(0) 推荐(0)
摘要: 1.在新安装的MDK5.30下,默认使用v6版本的工具链,在定义全局变量时,提示了一些类似下面的警告 warning: no previous extern declaration for non-static variable 'in' [-Wmissing-variable-declaratio 阅读全文
posted @ 2020-05-09 01:18 veis 阅读(5874) 评论(0) 推荐(1)
摘要: (1)使用BitBlt void CBRUSHTESTDlg::OnPaint() { CPaintDC dc(this); CBitmap bmp; bmp.LoadBitmap(IDB_BITMAP1); BITMAP bitmap; int size = bmp.GetBitmap(&bitm 阅读全文
posted @ 2020-05-06 18:33 veis 阅读(719) 评论(0) 推荐(0)
摘要: 0. 封装原因 主要因为Windows socket 相关的API调用步骤比较繁琐。 1. 头文件 #pragma once #include <WinSock2.h> #pragma comment(lib, "Ws2_32.lib") class CSocketLzf { protected: 阅读全文
posted @ 2020-05-04 08:23 veis 阅读(405) 评论(0) 推荐(0)
摘要: 错误提示 HEAP CORRUPTION DETECTED:after Normal block( ) at 0x . CRT detected that application wrote memory after end of heap buffer. 错误原因 使用的内存大于申请的内存,所以在 阅读全文
posted @ 2020-04-23 23:57 veis 阅读(2100) 评论(0) 推荐(0)
摘要: [toc] 使用window API开发一个具有字符串收发功能的串口助手 开发环境 Visual Studio 2015 串口设备相关的API CreateFile 参数详情见:https://docs.microsoft.com/en us/windows/win32/api/fileapi/nf 阅读全文
posted @ 2020-04-22 23:44 veis 阅读(2348) 评论(3) 推荐(1)
上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页