tags:

views:

22

answers:

1

Are there any calls for arranging icon by name, size, etc or 'Align to grid'?

A: 

I have never tried this, but if I had to I would first try sending LVM_ARRANGE message to the desktop window. And LVM_SORTITEMS/LVM_SORTITEMSEX might help with the sorting.

For the auto arrange you could try modify the style and using LVS_AUTOARRANGE style or the extended styles .

So you will need to use something like FindWindow to get the desktop windows and then use SetWindowLong with GWL_STYLE/GWL_EXSTYLE to modify the window style bits.

Chris Taylor