Jump to content

GUI Max and Min Buttons


Recommended Posts

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

Link to comment
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]
Link to comment
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)
Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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).

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...