找回密码
 加入
搜索
查看: 2035|回复: 1

[AU3基础] 有对OBJ熟悉的么,请教下怎么获取桌面背景GetWallpaper

[复制链接]
发表于 2015-1-2 12:54:07 | 显示全部楼层 |阅读模式
http://autoitx.com/forum.php?mod ... hlight=%B1%DA%D6%BD
;===============================================================================
#interface "IActiveDesktop"
Global Const $sCLSID_ActiveDesktop = "{75048700-EF1F-11D0-9888-006097DEACF9}"
Global Const $sIID_IActiveDesktop = "{F490EB00-1240-11D1-9888-006097DEACF9}"
Global Const $tagIActiveDesktop = _
        "ApplyChanges hresult(dword);" & _
        "GetWallpaper hresult(wstr;uint;dword);" & _
        "SetWallpaper hresult(wstr;dword);" & _
        "GetWallpaperOptions hresult(struct*;dword);" & _
        "SetWallpaperOptions hresult(struct*;dword);" & _
        "GetPattern hresult(wstr;uint;dword);" & _
        "SetPattern hresult(wstr;dword);" & _
        "GetDesktopItemOptions hresult(struct*;dword);" & _
        "SetDesktopItemOptions hresult(struct*;dword);" & _
        "AddDesktopItem hresult(struct*;dword);" & _
        "AddDesktopItemWithUI hresult(hwnd;struct*;dword);" & _
        "ModifyDesktopItem hresult(struct*;dword);" & _
        "RemoveDesktopItem hresult(struct*;dword);" & _
        "GetDesktopItemCount hresult(int*;dword);" & _
        "GetDesktopItem hresult(int;struct*;dword);" & _
        "GetDesktopItemByID hresult(ulong_ptr;struct*;dword);" & _
        "GenerateDesktopItemHtml hresult(wstr;struct*;dword);" & _
        "AddUrl hresult(hwnd;wstr;struct*;dword);" & _
        "GetDesktopItemBySource hresult(wstr;struct*;dword);"
;===============================================================================
 
Global Const $AD_APPLY_ALL = 0x00000007
 
;;;;;;;;;;;;;;;;;;; Example ;;;;;;;;;;;;;;;;;;;;;;;;;;;
$oActiveDesktop = ObjCreateInterface($sCLSID_ActiveDesktop, $sIID_IActiveDesktop, $tagIActiveDesktop)
Dim $a
$b=$oActiveDesktop.GetWallpaper($a,100,0x00000000)
MsgBox(0, $a, $oActiveDesktop.GetWallpaper($a,100,0x00000000))
#include'array.au3'
_ArrayDisplay($b)
 Exit
$sFile = FileOpenDialog("Select New Wallpaper", "", "Images (*.jpg;*.bmp;*.png;*.gif;*.whatever)") ; whatever
If $sFile Then
    $oActiveDesktop.SetWallpaper($sFile, 0)
    $oActiveDesktop.ApplyChanges($AD_APPLY_ALL)
EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
怎么写 貌似弄不明白额!
我想获取桌面背景
http://msdn.microsoft.com/en-us/library/bb776355(v=vs.85).aspx
这个是说明
有大神指教下么
 楼主| 发表于 2015-1-2 13:00:15 | 显示全部楼层
= =#完全没有头绪!!!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-12-23 12:58 , Processed in 0.067551 second(s), 22 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表