WinAPI for AutoArrange Desktop icons
WinAPI for AutoArrange Desktop icons
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!
Last edited by eJan on Sun Sep 03, 2006 12:55 pm, edited 1 time in total.
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
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)
BERESHEIT
Thanks netmaestro, unfortunately it doesn't work under XP even with:
Code: Select all
mouse_event_(#MOUSEEVENTF_RIGHTDOWN,0,0,0,0) : mouse_event_(#MOUSEEVENTF_RIGHTUP,0,0,0,0)
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
-
- Addict
- Posts: 1126
- Joined: Wed Oct 15, 2003 12:40 am
- Location: Sweden
- Contact:
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)

(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada