Function Reference


_WinAPI_SetClassLongEx

Replaces the specified value into the specified window belongs

#include <WinAPISys.au3>
_WinAPI_SetClassLongEx ( $hWnd, $iIndex, $iNewLong )

Parameters

$hWnd Handle to the window.
$iIndex The value to be replaced. This parameter can be one of the following values.
$GCL_CBCLSEXTRA
$GCL_CBWNDEXTRA
$GCL_HBRBACKGROUND
$GCL_HCURSOR
$GCL_HICON
$GCL_HICONSM
$GCL_HMODULE
$GCL_MENUNAME
$GCL_STYLE
$GCL_WNDPROC
$iNewLong The replacement value.

Return Value

Success: The previous value.
Failure: 0, call _WinAPI_GetLastError() to get extended error information.

Remarks

If this was not previously set, the return value is zero.

See Also

Search SetClassLong in MSDN Library.

Example

#NoTrayIcon

#include <APISysConstants.au3>
#include <GUIConstantsEx.au3>
#include <WinAPISys.au3>
#include <WindowsConstants.au3>

Local $hParent = GUICreate('', 0, 0, 0, 0, 0, $WS_EX_TOOLWINDOW)
Local $hForm = GUICreate('Test ' & StringReplace(@ScriptName, '.au3', '()'), 400, 400, -1, -1, BitOR($WS_CAPTION, $WS_POPUP, $WS_SYSMENU), BitOR($WS_EX_DLGMODALFRAME, $WS_EX_TOPMOST), $hParent)

; Remove window icon
_WinAPI_SetClassLongEx($hForm, $GCL_HICONSM, 0)
_WinAPI_SetClassLongEx($hForm, $GCL_HICON, 0)

GUISetState(@SW_SHOW)

Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE