Hi,
I'm trying to setting ( in the example remove ) the style from a extenal Windows but not work
this is my script:
#include <WinAPI.au3> #include <Constants.au3> #include <WindowsConstants.au3> While Sleep(10) $hWnd = WinGetHandle("[CLASS:TEST]") If IsHWnd($hWnd) Then ExitLoop WEnd $iOldStyle = _WinAPI_GetWindowLong($hWnd, $GWL_EXSTYLE) ConsoleWrite("+ old style: " & $iOldStyle & @CR) $iNewStyle = BitXOr($iOldStyle, $WS_EX_TOPMOST) _WinAPI_SetWindowLong($hWnd, $GWL_EXSTYLE, $iNewStyle) _WinAPI_SetWindowPos($hWnd, 0, 0, 0, 0, 0, BitOR($SWP_FRAMECHANGED, $SWP_NOMOVE, $SWP_NOSIZE)) ConsoleWrite("+ new style: " & $iNewStyle & @CR)
So my question are:
- Why not work?
- The return value of GetWindowLong is:
+ old style: 136
+ new style: 128
How i can know if 136-128 is equal to which style?