shaneG Posted August 26, 2009 Share Posted August 26, 2009 I found an article here which helps remove any window from the "AeroPeek" feature of Windows 7.The idea is to call the "dwmapi.dll" and excecute the function DwmSetWindowAttribute and set the property "DWMWA_EXCLUDED_FROM_PEEK" to true.Could somebody help me with that script ?Thanks in AdvanceshaneGirish__________________"Never underestimate a child's ability to get into more trouble." Link to comment Share on other sites More sharing options...
lujomu Posted December 29, 2009 Share Posted December 29, 2009 In case you are still interested ... here you go: Func _setExcludeFromPeek( Const $hWnd, $exclude = True) Local $struct, $dllReturn $struct = DllStructCreate( "int") if ( $exclude) Then DllStructSetData( $struct, 1, 1) Else DllStructSetData( $struct, 1, 0) EndIf $dllReturn = DllCall( "dwmapi.dll", _ "int", "DwmSetWindowAttribute", _ "hwnd", $hWnd, _ "dword", 12, _ "ptr", DllStructGetPtr( $struct), _ "dword", DllStructGetSize( $struct) ) If ( @error = 0 And $dllReturn[0] = 0) Then Return 1 Else Return 0 EndIf EndFunc Exclude e.g. 'Calculator' window from Aero Peek using ... $handle = WinGetHandle("Calculator") _setExcludeFromPeek( $handle)... or ... $handle = WinGetHandle("Calculator") _setExcludeFromPeek( $handle, True)And include it again using ... $handle = WinGetHandle("Calculator") _setExcludeFromPeek( $handle, False) Cheers, lujomu Link to comment Share on other sites More sharing options...
KaFu Posted December 29, 2009 Share Posted December 29, 2009 Nice , might make sense to create an AERO UDF of the stuff floating around (see also _WinGetPosEx() in my sig)... OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
James Posted December 29, 2009 Share Posted December 29, 2009 Nice , might make sense to create an AERO UDF of the stuff floating around (see also _WinGetPosEx() in my sig)...I've already written the functions for the Aero areas and such, check it out here. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
KaFu Posted December 30, 2009 Share Posted December 30, 2009 I've already written the functions for the Aero areas and such, check it out here.Yeah, those should definitly be included too, nice stuff . But what I'm more of fighting with atm is windows sizing and (relative) positioning, theres always a difference between aero and non aero (relative) positioning. Whats definitly needed is a WinSetPosEx() function auto-"compensating" the aero effects. OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
James Posted December 30, 2009 Share Posted December 30, 2009 Yeah, those should definitly be included too, nice stuff . But what I'm more of fighting with atm is windows sizing and (relative) positioning, theres always a difference between aero and non aero (relative) positioning. Whats definitly needed is a WinSetPosEx() function auto-"compensating" the aero effects.Shouldn't be too hard. You can use the DwmIsCompositionEnabled to check whether DWM is turned on. But then you need to also find out the size of the window border. But I'm sure at least one of the functions already does that. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
KaFu Posted December 30, 2009 Share Posted December 30, 2009 Shouldn't be too hard. You can use the DwmIsCompositionEnabled to check whether DWM is turned on. But then you need to also find out the size of the window border. But I'm sure at least one of the functions already does that.Thats exactly what can be done by comparing WinGetPos() results to my WinGetPosEx() function ... my problem is just what are the (are there any?) generic and coherent adjustments needed to have not the same but a similar style with aero on and off. OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
James Posted December 30, 2009 Share Posted December 30, 2009 Thats exactly what can be done by comparing WinGetPos() results to my WinGetPosEx() function ... my problem is just what are the (are there any?) generic and coherent adjustments needed to have not the same but a similar style with aero on and off.Surely they should be found in the registry? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now