Readying your Class for the Property Grid
#WINDOWS GRID DETAILS WINDOWS#
You can simply execute and place this EXE in the Startup, and enjoy the gridlines style until the future versions of Windows give an option to enable this in the display settings.Figure 3 - Customize ToolBox Dialog for Adding your PropertyGrid Control to the Toolbox In this way, you can change system windows, and application styles and behaviors. Hope you enjoyed playing with the system classes. Continue the Enumeration for all its child windows return TRUE SendMessage(hwnd, (UINT) LVM_SETEXTENDEDLISTVIEWSTYLE, 0, style) Apply only if the grid lines not set if((style & LVS_EX_GRIDLINES) = 0)
![windows grid details windows grid details](https://i.pinimg.com/originals/7d/1d/1a/7d1d1aa09bf13fe45ad641adb4dcab3b.gif)
If the class name is "SysListView32" // then this window is we are looking for if(strcmp(lpClassName, " SysListView32") = 0) Truncates if the class name is more than 15 Get the class name of the current window
#WINDOWS GRID DETAILS CODE#
So simply send a message to the target window to add the grid lines style, as you see in the code snippet below:Ĭopy Code // To enumerate the explorer windows's child windowsīOOL CALLBACK EnumChildWindowsProc(HWND hwnd, LPARAM lParam) Change the window's styleĪs you know about the Windows architecture, all communication between Windows and processes occur using messages. If it matches with SysListView32, then it is a window that we are looking for. As like above, we can check the class name of all the child windows. The Explorer program uses the common control listview for its right pan. Once we get the Explorer window handle, we can use the API EnumChildWindows() in order to get all the child window handles.
#WINDOWS GRID DETAILS HOW TO#
} How to identify the DetailView windows of Explorer windows? Continue the Enumeration for all top level windows return TRUE If the class name is "ExploreWClass" // then this window is Explorer's main window // Then, reterive all its child windows if(strcmp(lpClassName, " ExploreWClass") = 0)ĮnumChildWindows(hwnd, EnumChildWindowsProc, lParam)
![windows grid details windows grid details](https://miwindows.com/images/default-source/mi-4340sh/mi-4340sh-1_in_closed_lr.jpg)
Get the class name of the current window // Truncates if the class name is more // than 15 (don't want more than 15) If the class name is ExploreWClass, then we can conclude that this window is an Explorer instance, as shown below:Ĭopy Code // To enumerate all top level windowsīOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam) Then, we can use the GetClassName() API to get the class name. This API will give us each window handle, one by one. We can use a Windows API named EnumWindows() to enumerate all top level windows. Whenever we start a Windows Explorer instance, it creates a parent window, and its class name (of WNDCLASS structure) would be ExploreWClass. How to identify Explorer windows programmatically? By altering these properties, we can play around even with the system windows such as Explorer windows. So by changing these properties or styles, we can achieve our desired look and feel and behaviors. Every window has some styles and properties (please refer to the WNDCLASS structure) associated with it.
![windows grid details windows grid details](http://vinylwindowfactory.com/wp-content/uploads/2011/grids/double_prarie_grids.jpg)
If you have a background knowledge of the platform Windows API and its functionalities, then you know very well that every window we create or the system creates are child windows to the desktop window. For example, take a scenario - whenever we open the Explorer windows in Details view, we want to enable grid lines as you see in the above screenshot. This article demonstrates how we can change system windows' properties, styles, etc.