Jump to content

GUISetStyle(-1, $WS_POPUPWINDOW)


Go to solution Solved by pixelsearch,

Recommended Posts

Posted

Is the behavior of  _GUI2 logical ?  :unsure:
Or is this just behaving strangely towards me?

#include <GUIConstants.au3>

Global $Exit1, $Exit2

_GUI1()
_GUI2()

;**********************************
While True
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE, $Exit1, $Exit2
            Exit
    EndSwitch
WEnd
;**********************************

;----------------------------------------------------------------------------------------
Func _GUI1()
    Local $hGUI = GUICreate("Example Gui 1", 390, 320, @DesktopWidth * 0.7, -1, $WS_POPUPWINDOW)
;~  GUISetStyle(-1, $WS_POPUPWINDOW)
    GUISetBkColor(0x0D1117)

    Local $ShippingDetails = GUICtrlCreateLabel("Example Gui 1", 10, 5, 380, 30, -1, $GUI_WS_EX_PARENTDRAG)
    GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0xFFD800)

    $Exit1 = GUICtrlCreateButton("EXIT", 20, 270, 95, 40)
    GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0x0D1117)
    GUICtrlSetBkColor(-1, 0xFFD800)
    GUISetState(@SW_SHOW)

EndFunc   ;==>_GUI1
;----------------------------------------------------------------------------------------
Func _GUI2()
    Local $hGUI = GUICreate("Example Gui 2", 390, 320, @DesktopWidth * 0.3, -1)
    GUISetStyle(-1, $WS_POPUPWINDOW)
    GUISetBkColor(0x0D1117)

    Local $ShippingDetails = GUICtrlCreateLabel("Example Gui 2", 10, 5, 380, 30, -1, $GUI_WS_EX_PARENTDRAG)
    GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0xFFD800)

    $Exit2 = GUICtrlCreateButton("EXIT", 20, 270, 95, 40)
    GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0x0D1117)
    GUICtrlSetBkColor(-1, 0xFFD800)
    GUISetState(@SW_SHOW)

EndFunc   ;==>_GUI2

 

I know that I know nothing

Posted (edited)

Gui 1 (Control Viewer)
Style 0x94880000
WS_POPUP, WS_VISIBLE, WS_CLIPSIBLINGS, WS_BORDER, WS_SYSMENU

ExStyle 0

=================

For GUI2, the wrong syntax GUISetStyle(-1, $WS_POPUPWINDOW) messed up its ex style :

Gui 2 (GuiPropView)
Style 0x94CA0000 (unchanged, style kept as when GUI2 was created)

ExStyle 0x00080100 <= this is 0x80000 (WS_EX_LAYERED) that's why we couldn't see GUI2 + 0x100 (WS_EX_WINDOWEDGE)

 

Edited by pixelsearch
explanations

"I think you are searching a bug where there is no bug... don't listen to bad advice."

Posted

From "GUIStyles.inc.au3"

[0x80880000, 'WS_POPUPWINDOW']

[0x80000000, 'WS_POPUP']
[0x00800000, 'WS_BORDER']
[0x00080000, 'WS_SYSMENU']

Great how these 8's are vertically aligned :D

"I think you are searching a bug where there is no bug... don't listen to bad advice."

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
  • Recently Browsing   0 members

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