win7 系统时间托盘区如何添加图标

sina881027 2014-08-13 10:21:24
加精
最近看到一款软件做了一个比较新颖的东西,我就像自己实践一些,就是不知道如何去操作,用什么API或者什么技术。
具体东西如图,

通过
wnd = FindWindow("Shell_TrayWnd", NULL);
wnd = FindWindowEx(wnd, 0, "TrayNotifyWnd", NULL);
wnd = FindWindowEx(wnd, 0, "TrayClockWClass", NULL);
我能找到它的句柄,后面怎么做就不知道了。
...全文
1335 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
qq_1021540607 2016-03-17
  • 打赏
  • 举报
回复
cattpon 2016-03-17
  • 打赏
  • 举报
回复
什么意思???
「已注销」 2014-08-16
  • 打赏
  • 举报
回复
这必然是: 1.注入到了explorer进程 2.再对TrayClockWClass的窗口函数进行子类化,在wm_paint消息中用GDI函数绘制自己的东西。
碼上道 2014-08-16
  • 打赏
  • 举报
回复
引用 楼主 sina881027 的回复:
最近看到一款软件做了一个比较新颖的东西,我就像自己实践一些,就是不知道如何去操作,用什么API或者什么技术。 具体东西如图, 通过 wnd = FindWindow("Shell_TrayWnd", NULL); wnd = FindWindowEx(wnd, 0, "TrayNotifyWnd", NULL); wnd = FindWindowEx(wnd, 0, "TrayClockWClass", NULL); 我能找到它的句柄,后面怎么做就不知道了。
查一下任务栏 TB有没有什么api操作。
赵4老师 2014-08-14
  • 打赏
  • 举报
回复
无逆向,不分析。 去看雪论坛逛逛。
孤影品茗 2014-08-14
  • 打赏
  • 举报
回复
既然已经找到了托盘任务栏窗口句柄hWnd,通过TB_*消息来管理图标,使用SendMessage来对hWnd发送消息, TB_ADDBUTTONS,添加图标 TB_BUTTONCOUNT,获取当前图标个数 TB_DELETEBUTTON,删除图标 建议MSDN,查看上述消息的用法。 这是根据你标题的意思来说的,但是你正文又说要研究软件?想添加托盘图标,按照上述即可。
赵4老师 2014-08-13
  • 打赏
  • 举报
回复
使用APIMonitor软件查看你感兴趣的应用程序都调用了哪些Windows API。
碼上道 2014-08-13
  • 打赏
  • 举报
回复
帮顶一下,我也想了解一下
日知己所无 2014-08-13
  • 打赏
  • 举报
回复
路径配置好了的话APIMonitor里面可以直接启动起来DependencyWalker查看这些信息……
日知己所无 2014-08-13
  • 打赏
  • 举报
回复


选择上的那些API就是直接从那个DLL里调用的,和dumpbin的输出差不多
日知己所无 2014-08-13
  • 打赏
  • 举报
回复
安装一个VC,在类似于下面这样的目录里,找到dumpbin.exe C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin 执行类似下面这样的命令,查看dumpbin.txt的内容 【需要用具体的exe或者dll名称置换掉dumpbin.exe】 dumpbin/ALL dumpbin.exe>dumpbin.txt 其中的【Section contains the following imports】应该是你想要的东西
  Section contains the following imports:

    KERNEL32.dll
                4030F8 Import Address Table
                40303C Import Name Table
                     0 time date stamp
                     0 Index of first forwarder reference

                  1E3 GetCommandLineW
                  321 GetVersion
                  281 GetModuleHandleW
                  2B5 GetProcAddress
                  383 IsDebuggerPresent
                  117 DecodePointer
                  2F4 GetSystemTimeAsFileTime
                  228 GetCurrentThreadId
                  224 GetCurrentProcessId
                  43C QueryPerformanceCounter
                  13C EncodePointer
                  388 IsProcessorFeaturePresent

    MSVCR110.dll
                40312C Import Address Table
                403070 Import Name Table
                     0 time date stamp
                     0 Index of first forwarder reference

                  206 __wgetmainargs
                  1F0 __set_app_type
                  5CC exit
                  279 _exit
                  22C _cexit
                  23C _configthreadlocale
                  1F2 __setusermatherr
                  2FF _initterm_e
                  2FE _initterm
                  207 __winitenv
                  215 _amsg_exit
                  23B _commode
                  13B ?terminate@@YAXXZ
                  1A8 __crtSetUnhandledExceptionFilter
                  37C _lock
                  4E6 _unlock
                  22B _calloc_crt
                  1AC __dllonexit
                  422 _onexit
                  306 _invoke_watson
                  23F _controlfp_s
                  270 _except_handler4_common
                  24B _crt_debugger_hook
                  1AA __crtUnhandledException
                  1A9 __crtTerminateProcess
                  16F _XcptFilter
                  578 _wmakepath_s
                  6AA wprintf
                  59A _wsplitpath_s
                  593 _wspawnlp
                  57E _wpgmptr
                  591 _wspawnl
                  294 _fmode
如果不喜欢用命令行,也可以下载个GUI的DependencyWalker http://www.dependencywalker.com/
sina881027 2014-08-13
  • 打赏
  • 举报
回复
APIMonitor 没有找到需要的API 全是findsirstfile和findclose这2个API在跑

5,530

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 模式及实现
社区管理员
  • 模式及实现社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧