Jump to content
Sign in to follow this  

Toggle window Styles on and off

Recommended Posts


I can toggle the "click through" ($WS_EX_TRANSPARENT) on a window, but when I try to toggle the Title Bar on and off ($WS_CAPTION) it just disables it.

When the window is in Click through mode, I want the title bar to disappear.

if BitAnd(GUICtrlRead($Clickthru),$GUI_CHECKED) then
            _WinAPI_SetWindowLong($hMain, $GWL_EXSTYLE, _
            BitOR(_WinAPI_GetWindowLong($hMain, $GWL_EXSTYLE), $WS_EX_TRANSPARENT))

            _WinAPI_SetWindowLong($hMain, $GWL_STYLE, _
            BitOR(_WinAPI_GetWindowLong($hMain, $GWL_STYLE), $WS_CAPTION))

            $NoTrans   = BitNOT($WS_EX_TRANSPARENT)
               _WinAPI_SetWindowLong($hMain, $GWL_EXSTYLE, _
                BitAND(_WinAPI_GetWindowLong($hMain, $GWL_EXSTYLE), $NoTrans))

            $Caption        = BitNOT($WS_CAPTION)
               _WinAPI_SetWindowLong($hMain, $GWL_STYLE, _
               BitAND(_WinAPI_GetWindowLong($hMain, $GWL_STYLE), $Caption))

EDIT: See This

Edited by Lakes

2015 - Still no flying cars, instead blankets with sleeves.

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.