![]() ![]() Also, it will create Start Menu shortcuts for you to be able to return them to normal sizes or vice versa. There is also an installer, and it provides an option to make your desktop icons smaller automatically on startup. You may also want to try the sample application (attached as DeskIconSetup.zip) that I created that does the same functionality. But, we do not need to do the Step 2 anymore since it is for Vista and Windows 7 only. The sample is a console application that accepts these parameters: /SMALL - to set the icon sizes to smallest and display as a list, or /BIG - to return them to normal sizes.īasically, the above code will also work in Windows XP. That's it! Please have a look at the sample source code provided. SendMessage( hWnd, WM_STYLECHANGED, GWL_STYLE, (LONG)(&Styles) ) SetWindowLong( hWnd, GWL_STYLE, Styles.styleNew ) Styles.styleNew = Styles.styleOld & (~LVS_TYPEMASK) ![]() Styles.styleOld = GetWindowLong( hWnd, GWL_STYLE ) We call this repeatedly until we get the desired size: By using the window handle we retrieve from the search, we send the following messages: We can simulate this automatically by sending a window message to the list view. HKEYUSERS.DefaultSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer. Now check for a DWORD 'NoSaveSettings' in right-side pane under following keys: HKEYCURRENTUSERSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer. Step 2: Do the resizingĪs mentioned above, one method to resize the desktop icons is using the Control key and mouse wheel combination. Type regedit in RUN dialog box and press Enter. Right-click the desktop, point to View, and then click Large. After doing that, you will see that the ListView control is under a child window with the class name, SHELLDLL_DefView, and the ListView control's class name will be SysListView32. This tutorial shows how to resize desktop icons in Windows 7.There are 2 ways to resize icons:1. Using its "Search Window" feature, we can easily access the properties of the window or control we want by dragging its Finder Tool on to it and then pressing OK. There is a tool installed with Visual Studio called Spy++ which has the capability to display information of all the windows currently running. But before we can search, we need to know the names to search. Using the FindWindowEx API, we search the window that we are looking for by window name or class name. Under the callback, we use the handle to search the child windows or controls. For each window, it will get the handle and pass it to the specified callback. The code above will first enumerate all top-level windows in the screen using the EnumWindows API. HWND hDesk = FindWindowEx( hChild, NULL, _T( " SysListView32"), NULL ) ĮnumWindows( EnumWindowsProc, (LPARAM)&hWnd ) HWND hChild = FindWindowEx( hwnd, NULL, _T( " SHELLDLL_DefView"), NULL ) BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |