![]() ![]() 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. #Windows 10 icon resize problem windows 7#But, we do not need to do the Step 2 anymore since it is for Vista and Windows 7 only. #Windows 10 icon resize problem code#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. And now you can change the Windows Desktop icon size: Small icons : like Windows XP. Click on an empty space on the Windows desktop, right Mouse-Button. That's it! Please have a look at the sample source code provided. Please use the keyboard-shortcut Windows-logo+D to see the Windows Desktop. 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. Step 2: Do the resizingĪs mentioned above, one method to resize the desktop icons is using the Control key and mouse wheel combination. 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. 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 ) Copy Code 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 |