mirror of
https://github.com/LHY0125/PathEditor.git
synced 2026-05-09 18:02:52 +08:00
39d06e20e0
- 将单一列表拆分为系统和用户变量两个标签页 - 新增搜索框支持实时过滤路径 - 支持拖拽文件夹直接添加到列表 - 新增一键清理功能移除无效和重复路径 - 增加注册表备份机制和删除确认 - 优化界面布局和权限提示逻辑
30 lines
622 B
C
30 lines
622 B
C
#ifndef UTILS_H
|
|
#define UTILS_H
|
|
|
|
#include <windows.h>
|
|
#include <wchar.h>
|
|
#include <iup.h>
|
|
|
|
// 宽字符转UTF-8
|
|
char* wide_to_utf8(const wchar_t* wstr);
|
|
|
|
// UTF-8转宽字符
|
|
wchar_t* utf8_to_wide(const char* str);
|
|
|
|
// 检查管理员权限
|
|
int check_admin();
|
|
|
|
// 检查路径是否有效(存在且为目录)
|
|
int is_path_valid(const char *path);
|
|
|
|
// 刷新列表样式(斑马纹)
|
|
void refresh_list_style();
|
|
void refresh_single_list_style(Ihandle *list);
|
|
|
|
// 备份注册表
|
|
void backup_registry();
|
|
|
|
// 不区分大小写的字符串查找
|
|
char *stristr(const char *haystack, const char *needle);
|
|
|
|
#endif // UTILS_H
|