mirror of
https://github.com/LHY0125/PathEditor.git
synced 2026-05-10 02:09:46 +08:00
refactor: 重构代码以提取配置和全局变量
- 将 Windows 消息常量和 UI 配置常量分别提取到 globals.h 和 config.h 头文件中,提高可维护性 - 将全局变量和控件定义从 main.c 移至独立的 globals.c 源文件,实现关注点分离 - 更新 Makefile 以包含新的源文件 globals.c - 在 ui.c 和 main.c 中引用 config.h,使用配置常量替代硬编码的 UI 参数
This commit is contained in:
@@ -3,6 +3,16 @@
|
||||
|
||||
#include <iup.h>
|
||||
|
||||
// 定义 Windows 消息常量
|
||||
#ifndef WM_COPYGLOBALDATA
|
||||
#define WM_COPYGLOBALDATA 0x0049
|
||||
#endif
|
||||
|
||||
// 消息过滤器常量
|
||||
#ifndef MSGFLT_ADD
|
||||
#define MSGFLT_ADD 1
|
||||
#endif
|
||||
|
||||
// 注册表路径常量
|
||||
#define REG_PATH_SYS L"SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment"
|
||||
#define REG_PATH_USER L"Environment"
|
||||
|
||||
Reference in New Issue
Block a user