1 Star 0 Fork 3

DarrenLV/DesktopArt

forked from XsJIONG/DesktopArt 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Function.cpp 857 Bytes
一键复制 编辑 原始数据 按行查看 历史
XsJIONG 提交于 2018-05-13 21:55 . FixUpdate
#include <windows.h>
#include <commctrl.h>
#include <cmath>
int UP=10;
int main() {
HWND hwndParent=::FindWindow("Progman", "Program Manager");
HWND hwndSHELLDLL_DefView=::FindWindowEx(hwndParent, NULL, "SHELLDLL_DefView", NULL);
HWND hwndSysListView32=::FindWindowEx(hwndSHELLDLL_DefView, NULL, "SysListView32", "FolderView");
int Nm = ListView_GetItemCount(hwndSysListView32);
int ox=0;
int W=GetSystemMetrics(SM_CXFULLSCREEN);
int H=GetSystemMetrics(SM_CYFULLSCREEN)/2;
int of=0;
int x,y,rx;
double s;
while (true) {
s=W/Nm;
for(int i=0;i<Nm;i++) {
x = s*i;
rx=ox/10+x;
y = H-sin(rx)*50;
::SendMessage(hwndSysListView32, LVM_SETITEMPOSITION, (i+of)%Nm, MAKELPARAM(x,y));
}
ListView_RedrawItems(hwndSysListView32, 0, Nm - 1);
::UpdateWindow(hwndSysListView32);
ox+=1;
//of++;
of%=Nm;
//Sleep(UP);
}
return 0;
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/darrenlv/DesktopArt.git
git@gitee.com:darrenlv/DesktopArt.git
darrenlv
DesktopArt
DesktopArt
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385