Sign in to follow this  
Followers 0
herworth

GUI Max and Min Buttons

9 posts in this topic

I've searched all over microsoft.com and can't find the style no for a standard GUI with no Max and Min buttons (like a message box)

Any one out there know the answer?


[u][font="Arial"]Pete[/font][/u]

Share this post


Link to post
Share on other sites



I think this is an old problem in the source-code.

If someone use f.i. this:

Global $DS_MODALFRAME = 0x80
Global $WS_POPUP = 0x80000000
Global $WS_VISIBLE = 0x10000000
Global $WS_CAPTION = 0x00C00000
Global $WS_SYSMENU = 0x00080000

GUICreate("Test",-1,-1,-1,-1,$DS_MODALFRAME + $WS_POPUP + $WS_VISIBLE + $WS_CAPTION + $WS_SYSMENU)
GUIWaitClose()

it should appear in a gui only with the [x]-button you know.

If you use only:

GUICreate("Test",-1,-1,-1,-1,$DS_MODALFRAME + $WS_POPUP + $WS_VISIBLE + $WS_CAPTION)

then it should be a gui with no buttons (as temp.resolving)

Regards Holger

Share this post


Link to post
Share on other sites

Thanks Holger

I'm still using AU3GUIXP.EXE to create my GUIs but I'll give this a try. I assume it will be

... |style = ... etc

Thanks again


[u][font="Arial"]Pete[/font][/u]

Share this post


Link to post
Share on other sites

Holger

That didn't work. If I put anything (Including "") in style= .. I get no (x) no max or min and no borders. If I put exstyle = whatever nothing happens - I just get standard GUI.

It's not important but if anyone out there knows the solution I'd appreciate it.


[u][font="Arial"]Pete[/font][/u]

Share this post


Link to post
Share on other sites

Don't add the styles together, BitOr them.

Global $WS_POPUP = 0x80000000
Global $WS_CAPTION = 0x00C00000
Global $WS_SYSMENU = 0x00080000

Global $style = BitOr($WSPOPUP, $WS_CAPTION)
$style = BitOr($style, $WS_SYSMENU)

EnvSet(... "style=" & $style)

Share this post


Link to post
Share on other sites

Thanks Valik. I'll try that.

Share this post


Link to post
Share on other sites

What is BITOR actually doing to the numbers and does it make a difference which order you put them in?


[u][font="Arial"]Pete[/font][/u]

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

BitOr just compares Bits and sets it to 1 if either one is 1.

0011 = 3

0101 = 5

Bitor(3,5) = 0111 = 7

3+5 = 1000 = 8

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

The most important thing BitOr is doing is making the numbers pass through a 32-bit integer ensuring the proper bits are set. I've experienced problems in the past by adding styles because they are stored as doubles (Which are much larger than ints).

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  
Followers 0