WinAPI for AutoArrange Desktop icons
Posted: Sun Sep 03, 2006 2:27 am
I need API call to set permanently AutoArrange & Align to Grid for Desktop icons. I Have tried using Registry but it doesn't work with Reatogo-X-PE. Please help!
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
; Set desktop icons to permanently autoarrange
hWnd = FindWindow_("Progman", 0)
hWnd = GetWindow_(hWnd, #GW_CHILD)
hWnd = GetWindow_(hWnd, #GW_CHILD)
SetWindowLong_(hWnd, #GWL_STYLE, GetWindowLong_(hWnd, #GWL_STYLE) | #LVS_AUTOARRANGE | #LVS_ALIGNLEFT)
Code: Select all
mouse_event_(#MOUSEEVENTF_RIGHTDOWN,0,0,0,0) : mouse_event_(#MOUSEEVENTF_RIGHTUP,0,0,0,0)
Works fine here; WinXP Pro SP2 (english) , if I turn off "Auto Arrange".netmaestro wrote:Code: Select all
; Set desktop icons to permanently autoarrange hWnd = FindWindow_("Progman", 0) hWnd = GetWindow_(hWnd, #GW_CHILD) hWnd = GetWindow_(hWnd, #GW_CHILD) SetWindowLong_(hWnd, #GWL_STYLE, GetWindowLong_(hWnd, #GWL_STYLE) | #LVS_AUTOARRANGE | #LVS_ALIGNLEFT)