1 Star 0 Fork 4

AlongsCode/eapi

forked from 精易科技/eapi 
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
eapi_58_ShowDesktopIcon.cpp 1.22 KB
一键复制 编辑 原始数据 按行查看 历史
AlongsCode 提交于 2023-02-11 03:01 +08:00 . 重构完成,反馈的问题全部修复完了
#include "..\include_eapi_header.h"
#include <atlbase.h>
#include <atlcom.h>
#include <ShlObj.h>
#include <comutil.h>
#include <string>
#include<atlcom.h>
#include <iostream>
#include <ShObjIdl.h>
#include <comdef.h>
// 调用格式: _SDT_NULL 显示桌面图标, 命令说明: NULL
// 无参数
EAPI_EXTERN_C void eapi_ShowDesktopIcon_58_eapi(PMDATA_INF pRetData, INT nArgCount, PMDATA_INF pArgInf)
{
//HKEY hKey;
//LONG lResult = RegOpenKeyExW(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", 0, KEY_SET_VALUE, &hKey);
//if (lResult == ERROR_SUCCESS)
//{
// RegSetValueExW(hKey, L"NoDesktop", 0, REG_DWORD, 0, sizeof(DWORD));
// RegCloseKey(hKey);
//}
////win8以下winapi控制
//HWND hWnd = FindWindowW(L"Progman", L"Program Manager");
//if (hWnd == NULL)
// hWnd = FindWindowW(L"WorkerW", NULL);
//if (hWnd)
//{
// ShowWindow(hWnd, SW_HIDE);
// UpdateWindow(hWnd);
//}
HWND hWnd = FindWindowW(L"Progman", L"Program Manager");
if (hWnd)
{
ShowWindow(hWnd, SW_SHOW);
UpdateWindow(hWnd);
}
else {
hWnd = FindWindowW(L"WorkerW", NULL);
ShowWindow(hWnd, SW_SHOW);
UpdateWindow(hWnd);
}
//SHELLSTATE ss;
//SecureZeroMemory(&ss, sizeof(ss));
//SHGetSetSettings(&ss, SSF_HIDEICONS, FALSE);
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/alongscode/eapi.git
git@gitee.com:alongscode/eapi.git
alongscode
eapi
eapi
master

搜索帮助