Jump to content
Sign in to follow this  
m0nk3yI3unz

DLL flag values

Recommended Posts

Hey all. Im having a problm finding out the bits or hex values used for flag parameters in DLL Calls. Im referring to http://msdn2.microsoft.com/en-us/library/m...545(VS.85).aspx . I want to put a frame around a window, so I would want to set the SWP_DRAWFRAME flag - but putting in "SWP_DRAWFRAME" in the uint type, obviously, doesn't work. I figured I had to find the bit, after seeing the AutoIt Theme script, question being How?

Any help?

Share this post


Link to post
Share on other sites

$gui = GuiCreate ("", 500, 500, 10, 10)
GUISetState (@SW_SHOW)
Sleep (3000)
$hwnd = $gui
$insertafter = "HWND_NOTOPMOST"
$x = 100
$y = 100
$cx = 250
$cy = 250
$flags = 0x0020;SWP_DRAWFRAME = SWP_FRAMECHANGED??  From what I have found it does :S
$val = DllCall ("USER32.dll", "INT", "SetWindowPos", "HWND", $hwnd, "HWND", $insertafter, "INT", $x, "INT", $y, "INT", $cx, "INT", $cy, "UINT", $flags)
MsgBox (0, "", $val[0])
Sleep (3000)

Edited by Bert

Share this post


Link to post
Share on other sites

I use Gary's API constants script whenever I need a constant that's not been defined.

It gave me this:

Global Const $SWP_FRAMECHANGED = 0x20
Global Const $SWP_DRAWFRAME = $SWP_FRAMECHANGED

(So yes, you were right Bert)

Yay! Lol. :P

@OP- WinGetHandle... :D

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×
×
  • Create New...