Funktionreferenz


_WinAPI_SetClassLongEx


Replaces the specified value into the specified window belongs

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

Parameter

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

Rückgabewert

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

Bemerkungen

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

Siehe auch

Suche nach SetClassLong in der MSDN Bibliothek.

Beispiel

#NoTrayIcon

#include <APISysConstants.au3>
#include <GUIConstantsEx.au3>
#include <WinAPISysWin.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)

; Entfernt das Window Icon
_WinAPI_SetClassLongEx($hForm, $GCL_HICONSM, 0)
_WinAPI_SetClassLongEx($hForm, $GCL_HICON, 0)

GUISetState(@SW_SHOW)

Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE