Jump to content
Sign in to follow this  
quaizywabbit

Alter Style & Exstyle in existing window

Recommended Posts

quaizywabbit

Is this possible? Didn't see anything in help relating to this....


[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites
jpm

Is this possible? Didn't see anything in help relating to this....

<{POST_SNAPBACK}>

What do you mean a window created by GUI functions or others?

Share this post


Link to post
Share on other sites
CyberSlug

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!

Share this post


Link to post
Share on other sites
SlimShady

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

Share this post


Link to post
Share on other sites
CyberSlug

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!

Share this post


Link to post
Share on other sites
quaizywabbit

my experience is that you GetWindowLong... then SetWindowLong... then some API that updates / repaints the window...

Lar.

<{POST_SNAPBACK}>

Where would I look to find the API to update/repaint the window?

[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites
quaizywabbit

I'm planning on adding this to the "ANYGUI.au3" functions when I get this figured out.... Thanks Larry :)


[u]Do more with pre-existing apps![/u]ANYGUIv2.8

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  

×