Jump to content

Alter Style & Exstyle in existing window


Recommended Posts

Something like this: But this seems to mess up the window; am I missing a step?

#include <GuiConstants.au3>

GuiCreate("Example")

Global $GWL_STYLE   = -16;Indicates setting a new window style.
Global $GWL_EXSTYLE = -20;Indicates setting a new extended window style.

$handle = WinGetHandle("Example")
DllCall("user32.dll", "long", "SetWindowLong", "hwnd", $handle, "int", $GWL_STYLE, "long", 0x94CA0000)


GuiSetState(@SW_SHOW)
While GuiGetMsg() <> $GUI_EVENT_CLOSE
WEnd

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

You forgot to BitOR the current/default/forced window styles with the new one.

<{POST_SNAPBACK}>

In my particular example I'm using the full Bit-ORed style according to WinSpy++

WS_POPUPWINDOW  80880000
WS_VISIBLE  10000000
WS_CLIPSIBLINGS 04000000
WS_DLGFRAME 00400000
WS_GROUP    00020000

So the window shouldn't change at all.

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
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
 Share

  • Recently Browsing   0 members

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