Share via


GweBypassCoredllThunk_t::SetClassLongW_I (Windows Embedded CE 6.0)

1/6/2010

This method replaces the specified 32-bit (LONG) value at the specified offset into the extra class memory of the WNDCLASS structure for the class to which the specified window belongs.

Syntax

static DWORD WINAPI SetClassLongW_I(
  HWND hwndThis,
  INT nIndex,
  LONG lNewValue
);

Parameters

  • hwndThis
    [in] Handle to the window and, indirectly, the class to which the window belongs.
  • nIndex
    [in] Integer that specifies the 32-bit value to replace. To set a 32-bit value in the extra class memory, specify the positive, zero-based byte offset of the value to be set. Valid values are in the range zero through the number of bytes of extra class memory, minus four; for example, if you specified 12 or more bytes of extra class memory, a value of 8 would be an index to the third 32-bit integer. In Windows Embedded CE, the byte offset but must be a multiple of 4 bytes.

    The following table shows the possible values if a mouse cursor is supported.

    Value Description

    GCL_HCURSOR

    Replaces a handle to the cursor associated with the class.

    Windows Embedded CE versions that support mouse cursors include the Iconcurs and Mcursor components rather than the Icon and Cursor components.

  • lNewValue
    [in] Long integer that specifies the replacement value.

Return Value

The previous value of the specified 32-bit integer indicates success. Zero indicates that the value was not previously set or that the function failed. To get extended error information, call GetLastError.

Remarks

This method is an internal version of the SetClassLong function.

Reserve extra class memory by specifying a nonzero value in the cbClsExtra member of the WNDCLASS structure used with the RegisterClass function.

Unaligned access is not supported.

Use the GweBypassCoredllThunk_t::SetClassLongW_I method with care. For example, you can change the background color for a class by using GweBypassCoredllThunk_t::SetClassLongW_I, but this change does not immediately repaint all windows belonging to the class.

Requirements

Header gwebypasscoredllthunk.hpp
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

GweBypassCoredllThunk_t
RegisterClass
SetClassLong
GweBypassCoredllThunk_t::GetClassLongW_I
GweBypassCoredllThunk_t::SetWindowLongW_I
WindowProc
WNDCLASS