Jump to content

Recommended Posts

Posted

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.

Posted

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.

Posted

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

Posted

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!

Posted

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.

Posted (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 muttley

Edit: Bool: True or False (I know that) but not how to use it in a structure like dword, int, long etc.

Edited by JamesBrooks
Posted

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!

Posted

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?

Posted

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!

Posted

The closest thing I can get to a face-palm type emote: muttley

Please stop until you learn the difference between numbers and types.

Posted

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.

Posted

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.

Posted

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!

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...