James Posted July 8, 2008 Author Share Posted July 8, 2008 Yeah! I know, I was just saying muttley Neat example James. I see you have also updated System Properties Wrapper with the GUI nice! 5 stars for both scripts!Heh thanks. SPW or OEMWizard shows the example I posted in action if your running Vista! Thanks for the stars! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
James Posted July 9, 2008 Author Share Posted July 9, 2008 I have just found a bug when trying to create two areas which you don't want affecting: #include <GUIConstants.au3> #include <Vista.au3> Global $Area1[4] = [0, 0, 0, 76] Global $Area2[4] = [0, 0, 76, 0] $GUI = GUICreate("GUI", 408, 181) ; Top GUICtrlCreateLabel("", 0, 0, 408, 76) GUICtrlSetBkColor(-1, 0x000000) _Vista_ApplyGlassArea($GUI, $Area2, 0xE2E2E2) ; Bottom GUICtrlCreateLabel("", 0, 105, 408, 76) GUICtrlSetBkColor(-1, 0x000000) _Vista_ApplyGlassArea($GUI, $Area1, 0xE2E2E2) GUISetState(@SW_SHOW) While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd This must either be down to the load which is being drawn, or DWM cannot handle multiple drawings in the way the function is made. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
wesdegroot Posted July 10, 2008 Share Posted July 10, 2008 a verry late question but how do i know the Global $Area1[4] = [0, 0, 0, 76]; how can i set it good how must i set it.? i write it down in dutch becouse my english is not verry good @nederlands: hoe kan ik de "Global $Area1[4] = [0, 0, 0, 76]" berekenen wat houd het in? wesdegroot. Link to comment Share on other sites More sharing options...
James Posted July 10, 2008 Author Share Posted July 10, 2008 Left, Right, Top and Bottom muttley So if you wanted the area to be 10px from the left, 10 from the top then you would do: $Area[4] = [10, 0, 10, 0] If that's wrong tell me, I am all mixed up at the moment. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
ProgAndy Posted July 10, 2008 Share Posted July 10, 2008 If you want the whole area with blur, but not the controls, you have to use regions and DwmEnableBlurBehindWindow ( http://msdn.microsoft.com/en-us/library/aa969508(VS.85).aspx ) *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
James Posted July 10, 2008 Author Share Posted July 10, 2008 If you want the whole area with blur, but not the controls, you have to use regions and DwmEnableBlurBehindWindow ( http://msdn.microsoft.com/en-us/library/aa969508(VS.85).aspx )Brilliant! I will get to work on that! Might be useful for my current program updates! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
James Posted July 10, 2008 Author Share Posted July 10, 2008 These structures have confused the heck out of me! How do you create a const structure? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
monoceres Posted July 10, 2008 Share Posted July 10, 2008 These structures have confused the heck out of me! How do you create a const structure?Where did you find a structure called const? Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
James Posted July 10, 2008 Author Share Posted July 10, 2008 Where did you find a structure called const?muttley Not Const, bool. typedef struct _DWM_BLURBEHIND { DWORD dwFlags; BOOL fEnable; HRGN hRgnBlur; BOOL fTransitionOnMaximized; } DWM_BLURBEHIND, *PDWM_BLURBEHIND; If I am correct the, "HRGN" will need to be a variable to the $Struct yes? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Valik Posted July 10, 2008 Share Posted July 10, 2008 People working with DllStruct stuff without at least rudimentary C knowledge. Tsk. Tsk. I suggest you read up on the basics of C parameters and modifiers if you're going to continue this. You clearly misunderstand what the const modifier is for when it appears in a function declaration. Link to comment Share on other sites More sharing options...
James Posted July 10, 2008 Author Share Posted July 10, 2008 (edited) People working with DllStruct stuff without at least rudimentary C knowledge. Tsk. Tsk.I suggest you read up on the basics of C parameters and modifiers if you're going to continue this. You clearly misunderstand what the const modifier is for when it appears in a function declaration.Well I have used C++ partially before, just never needed Constants. I will go back and read it like you said muttleyEdit: Bool: True or False (I know that) but not how to use it in a structure like dword, int, long etc. Edited July 10, 2008 by JamesBrooks Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
monoceres Posted July 10, 2008 Share Posted July 10, 2008 Well I have used C++ partially before, just never needed Constants. I will go back and read it like you said muttley Edit: Bool: True or False (I know that) but not how to use it in a structure like dword, int, long etc.bool is the same as int and false=0 and true= non-zero (I think). Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
Valik Posted July 10, 2008 Share Posted July 10, 2008 Remember that this is C. There is no bool type in C. And remember that C/C++ is case sensitive so bool != BOOL anyway. Now, what's BOOL? Link to comment Share on other sites More sharing options...
wesdegroot Posted July 10, 2008 Share Posted July 10, 2008 Left, Right, Top and Bottom muttley So if you wanted the area to be 10px from the left, 10 from the top then you would do: $Area[4] = [10, 0, 10, 0] If that's wrong tell me, I am all mixed up at the moment. tnx here was i looking for! Link to comment Share on other sites More sharing options...
James Posted July 10, 2008 Author Share Posted July 10, 2008 Remember that this is C. There is no bool type in C. And remember that C/C++ is case sensitive so bool != BOOL anyway.Now, what's BOOL?0x000000 or 0x000001?tnx here was i looking for!No problem! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Valik Posted July 10, 2008 Share Posted July 10, 2008 The closest thing I can get to a face-palm type emote: muttley Please stop until you learn the difference between numbers and types. Link to comment Share on other sites More sharing options...
wraithdu Posted July 10, 2008 Share Posted July 10, 2008 I believe I'm correct in that BOOL is a Microsoft specific type that is defined as an 'int'. So, it can have any value. But there are TRUE and FALSE macros which are BOOL types (int's) defined as TRUE = 1 and FALSE = 0. Link to comment Share on other sites More sharing options...
monoceres Posted July 10, 2008 Share Posted July 10, 2008 I'm pretty sure BOOL is actually an int, at least it has the same size as an int (4). Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
Valik Posted July 10, 2008 Share Posted July 10, 2008 While you both are correct, it saddens me a little that you are both so unsure. It's not hard to figure these types out. They're documented. Link to comment Share on other sites More sharing options...
monoceres Posted July 10, 2008 Share Posted July 10, 2008 Yeah, I guess I was lazy. Here's an example on using the function on the msdn page above btw: $hwnd=GUICreate("Sample",300,200) GUISetState() GUISetBkColor(0x000000) Global Const $DWM_BB_ENABLE=0x01 Global Const $DWM_BB_BLURREGION=0x02 Global Const $DWM_BB_TRANSITIONONMAXIMIZED=0x04 $DWM_BLURBEHIND=DllStructCreate("dword dwFlags;int fEnable;int hRgnBlur;int fTransitionOnMaximized;") DllStructSetData($DWM_BLURBEHIND,"dwFlags",BitOR($DWM_BB_ENABLE,$DWM_BB_BLURREGION)) DllStructSetData($DWM_BLURBEHIND,"fEnable",1) DllStructSetData($DWM_BLURBEHIND,"hRgnBlur",0) DllStructSetData($DWM_BLURBEHIND,"fTransitionOnMaximized",1) DllCall("dwmapi.dll","int","DwmEnableBlurBehindWindow","hwnd",$hwnd,"ptr",DllStructGetPtr($DWM_BLURBEHIND)) Do $msg=GUIGetMsg() Until $msg=-3 Broken link? PM me and I'll send you the file! 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