WinCC Mouse Pointer Override on ActiveX HMI Symbol Library

David Krause17 min read
SiemensTroubleshootingWinCC
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Problem Description

When an integrator configures a custom mouse pointer in a Siemens SIMATIC WinCC V7 project through the standard path Computer Properties > Runtime > Mouse Pointer, the new cursor renders correctly when the mouse hovers over standard WinCC graphics objects: buttons, I/O fields, text fields, and graphic views managed by the WinCC graphics runtime (PDLCE / CCDMEngine). However, when the mouse passes over an HMI Symbol Library object - typically an ActiveX-based component such as Valve_S, Motor_S, Pump_S, animated tank symbols, or any custom ActiveX faceplate inserted from the Symbol Library - the cursor reverts to the default Windows arrow or to the original WinCC cursor, regardless of the dropdown selection.

This behavior has been observed in WinCC V7.0, V7.0 SP1, V7.1, V7.2, V7.3, V7.4, V7.4 SP1, V7.5, and V7.5 SP2 Update 10. It also reproduces in WinCC Professional (TIA Portal RT Professional) when the project-level cursor is configured and the screen contains Symbol Library objects or third-party ActiveX controls. The customer-facing impact is operational: operators expect visual confirmation of interactivity, and a cursor that changes on buttons but not on active valve/motor objects creates confusion about which screen objects are clickable.

Two Cursor Rendering Pipelines in WinCC RuntimeStandard Object PipelineMouse hovers Button / IO FieldWM_SETCURSOR > WinCC runtimeLoads configured .cur/.aniResult: HAND cursor visibleActiveX Control PipelineMouse hovers Valve_S / Motor_SActiveX IOleControl dispatchesInternal IDC_ARROW resourceResult: default arrow reverts

Root Cause Analysis: Standard Objects vs ActiveX Controls

The discrepancy arises from two distinct cursor rendering pipelines inside the WinCC graphics runtime:

  1. Standard WinCC graphics objects (buttons, I/O fields, text fields, polygon, line, circle, rectangle, graphic view) are drawn by the WinCC graphics runtime. Each of these object types registers a standard Windows WM_SETCURSOR handler that reads the project-level Mouse Pointer configuration and renders the selected .cur or .ani resource when the mouse is over the object's bounding rectangle. This is why the custom HAND cursor appears on these objects immediately after a WinCC Runtime restart.
  2. HMI Symbol Library objects are ActiveX controls - in-process COM servers registered on the engineering and runtime stations by the WinCC Symbol Library setup (installed through WinCC Setup > Components > HMI Symbol Library). ActiveX containers in WinCC host these controls inside their own windowless or windowed sub-region. Because each ActiveX control implements its own IOleObject / IOleControl interfaces and dispatches its own mouse events, the container-level WM_SETCURSOR handler from the WinCC graphics runtime is not invoked when the mouse moves over the ActiveX bounds. The ActiveX control falls back to its internal default cursor resource (typically the IDC_ARROW standard Windows cursor) or, for animated Symbol Library components, a cursor resource that ships with the control itself.

This explains why the configured HAND cursor appears on a button next to a valve symbol, but the valve symbol still shows the original arrow. The configuration is correct; the rendering path for the ActiveX is different.

Why Some Quick Workarounds Appear to Fail

Several integrator workarounds have surfaced. Each has limitations that are important to understand before selection:

  • Selecting every Mouse Pointer list entry (hand, cross, I-beam, hourglass, size-all) in Computer Properties > Runtime: configures the cursor for the standard object pipeline only and does not reach ActiveX controls. Selecting all entries produces identical behavior to selecting one.
  • Setting the Mouse Pointer list to blank so that WinCC falls back to a default: removes the project-level assignment and reverts every standard object to the Windows default arrow. ActiveX controls continue to use their internal default. This is not a fix.
  • Editing the Windows registry to replace the cursor resource that WinCC loads at runtime: unsupported by Siemens, breaks across Windows version updates, HiDPI scaling changes, and WinCC service packs.

Default WinCC Cursor Configuration Path (V7)

For a baseline configuration, the Mouse Pointer list in WinCC V7 is set at the Computer level (not the Project level). The complete path is:

  1. In WinCC Explorer, right-click the target computer name (for example, the OS server name under Computers) and select Properties.
  2. In the Computer Properties dialog, select the Runtime tab.
  3. Locate the Mouse Pointer group. The dropdown lists every Windows stock cursor that the WinCC graphics runtime can substitute for the default arrow.
  4. Select the desired cursor (for example, the HAND resource). The change is stored in the computer's computer_name.rt file under the project \GraCS\ folder and in the project database *.pck archive.
  5. Click OK, save the project, and restart WinCC Runtime. The cursor change does NOT take effect until both Graphics Runtime and the project have been fully reloaded.
Important: Mouse pointers are computer-specific, not project-specific. On a multi-client architecture (one server, several clients), every client station must have its own Computer Properties edited - or the .rt file replicated - for the custom cursor to appear consistently.

Custom .cur and .ani File Paths

If the desired cursor is not on the dropdown list - for example, a customer-supplied HAND.cur with a specific color or animation - it must be placed in a folder reachable from the runtime station and registered through a tag reference. Siemens documents the procedure in KB article 15222441 - How can you dynamize your mouse pointers from SIMATIC WinCC? The basic sequence is:

  1. Copy the .cur or .ani file to the WinCC project \GraCS\ folder, or to any absolute path the runtime service can read.
  2. Reference the file in a WinCC tag of type "Text tag 8-bit character set" or "Text tag 16-bit character set" (the value is the full path, for example C:\WinCC\Projects\HMI_Cursor\hand.ani).
  3. In the Mouse Pointer dropdown of Computer Properties > Runtime, select the tag rather than a static cursor resource. The dropdown displays the tag name, and at runtime WinCC resolves the tag value and loads the referenced .cur or .ani file dynamically.

This approach is the only Siemens-supported way to load non-stock cursor files into WinCC V7 Runtime.

Cursor File Format Requirements

WinCC V7 graphics runtime uses the Windows GDI cursor API (LoadCursorFromFile / CreateIconFromResourceEx) to load .cur and .ani files. The following file requirements apply across WinCC V7.0 through V7.5 SP2:

Parameter Requirement Notes
Static cursor format .cur 1, 4, 8, 24, or 32 bpp; 32 bpp alpha requires Aero
Animated cursor format .ani Max 16 frames recommended; 64x64 max recommended
Standard sizes 16x16, 32x32, 48x48 Multi-resolution .cur supported via IcoFX or VS Image Library Editor
HiDPI sizes 64x64, 96x96, 128x128 Required for 150% / 200% Windows scaling on 4K runtime stations
Hotspot Match click target HAND hotspot is index fingertip at (16, 1) in 16x16
File path encoding ASCII Avoid Unicode-only filenames on Windows Server Core

32 bpp .cur files on Windows Server 2008 R2 without Aero may render with a black background. For Windows Server Core editions (Server 2019 Core, Server 2022 Core) used as WinCC Servers, use 24 bpp .cur files exclusively. Color cursors with embedded 32-bit alpha channels are supported on Windows 7 and later with Aero enabled.

Resolution Method 1: Native Configuration and Restart

For projects where every interactive element is a standard WinCC object (no Symbol Library, no third-party ActiveX), the native configuration is sufficient. The steps are:

  1. Open WinCC Explorer as a user with project administrator rights.
  2. Right-click the target computer name and select Properties.
  3. Click the Runtime tab.
  4. In the Mouse Pointer group, select the desired cursor from the dropdown. For a HAND, choose the entry that maps to the Windows stock hand cursor (typically the third or fourth entry depending on the WinCC version).
  5. Click OK to apply.
  6. In WinCC Explorer, activate the project (or, on a client, the client project) if it is not already running.
  7. Open Graphics Runtime and verify the cursor over a Button and an I/O field.
  8. Close and re-open Graphics Runtime for the cursor change to take effect. Some integrators report the change applies after a full WinCC Explorer restart; both are safe.

Verification: Move the mouse over a Button - the configured HAND cursor should appear. Move the mouse over an I/O field - the same cursor should appear. Move the mouse over an empty background area - the configured cursor should appear. If the cursor does not change over a standard object, restart the entire WinCC Runtime (not just Graphics Runtime) and re-verify.

Resolution Method 2: MouseMove Event Script (VBS) for ActiveX Objects

The only Siemens-supported way to override the default cursor of an HMI Symbol Library ActiveX object on a per-object basis is to attach a MouseMove event handler that calls the Windows API to set the cursor during the hover period. The script is written in VBScript and uses the SetCursor / LoadCursorFromFile Win32 API functions.

To attach the handler in WinCC V7 Graphics Designer:

  1. Select the ActiveX object on the screen (for example, a Valve_S instance from the HMI Symbol Library).
  2. In the Properties dialog, navigate to Events > Mouse > MouseMove.
  3. Right-click and select VBS Action to create a new action.
  4. Paste the VBS code shown below. Save and rebuild the screen.

The recommended VBS code uses the Win32 API to load a custom .cur/.ani file and set it as the active cursor each time the mouse moves over the ActiveX bounds. Declare the API functions once at project scope (in @Script\global.bas or under Project Properties > C Scripts / VBS Scripts):

Declare Function LoadCursorFromFile Lib "user32.dll" Alias "LoadCursorFromFileA" _
    (ByVal lpFileName As String) As Long

Declare Function SetCursor Lib "user32.dll" _
    (ByVal hCursor As Long) As Long

Public gHandCursor As Long

Then attach the following handler to each ActiveX object's MouseMove event:

Sub OnMouseMove(ByVal Item, ByVal Flags, ByVal x, ByVal y)
    If gHandCursor = 0 Then
        gHandCursor = LoadCursorFromFile("C:\WinCC\Projects\HMI_Cursor\hand.ani")
    End If
    If gHandCursor <> 0 Then
        SetCursor gHandCursor
    End If
End Sub

Sub OnMouseLeave(ByVal Item, ByVal Flags, ByVal x, ByVal y)
    ' Restore default cursor when leaving the object
    SetCursor LoadCursorFromFile("C:\Windows\Cursors\aero_arrow.cur")
End Sub

A safer pattern that does not modify the global system cursor (which would persist after Runtime exit) is to use SetCursor on each WM_SETCURSOR message. However, the standard WinCC event model exposes MouseMove (not WM_SETCURSOR), so the cursor refreshes only while the mouse is moving. If the operator stops the mouse over the object, the cursor may flicker back to default. To prevent this, attach both a MouseMove and a MouseEnter event handler to the ActiveX and call SetCursor in both:

Sub OnMouseEnter(ByVal Item, ByVal Flags, ByVal x, ByVal y)
    If gHandCursor = 0 Then
        gHandCursor = LoadCursorFromFile("C:\WinCC\Projects\HMI_Cursor\hand.ani")
    End If
    If gHandCursor <> 0 Then
        SetCursor gHandCursor
    End If
End Sub

For customers that do not require a custom .cur/.ani file and only need the stock Windows HAND cursor, use the HMIRuntime.MousePointer property pattern. The MousePointer enum value for the HAND cursor varies by WinCC version - in V7.4 SP1 and later, the documented value is 15 (matching the VB6 extended enum). On earlier versions, test the value with a trial screen before deploying:

Sub OnMouseMove_Stock(ByVal Item, ByVal Flags, ByVal x, ByVal y)
    HMIRuntime.Screens("Main").MousePointer = 15   ' HAND
End Sub

Sub OnMouseLeave_Stock(ByVal Item, ByVal Flags, ByVal x, ByVal y)
    HMIRuntime.Screens("Main").MousePointer = 0    ' Default
End Sub
MouseMove Event Handler Flow for ActiveX OverrideMouse enters ActiveXOnMouseMove VBS firesLoadCursorFromFile()Mouse leaves ActiveXOnMouseLeave VBS firesRestore default cursor

Resolution Method 3: Dynamic Cursor via Tag Reference

When the customer requires multiple cursors on the same screen (for example, a HAND cursor over valves and a custom DRAG cursor over draggable motors), bind the Mouse Pointer dropdown in Computer Properties to a WinCC text tag and update the tag value from VBS at runtime:

  1. Create an internal text tag Cursor_File with initial value C:\WinCC\Projects\HMI_Cursor\hand.ani.
  2. In Computer Properties > Runtime > Mouse Pointer, select the tag rather than a static cursor. The dropdown list will display the tag name.
  3. In each ActiveX object's MouseMove handler, set the cursor file via tag:
Sub OnMouseMove_Valve(ByVal Item, ByVal Flags, ByVal x, ByVal y)
    HMIRuntime.Tags("Cursor_File").Write "C:\WinCC\Projects\HMI_Cursor\hand.ani"
End Sub

Sub OnMouseMove_Motor(ByVal Item, ByVal Flags, ByVal x, ByVal y)
    HMIRuntime.Tags("Cursor_File").Write "C:\WinCC\Projects\HMI_Cursor\drag.cur"
End Sub

The tag change triggers WinCC to reload the cursor file from disk and apply it to the standard object pipeline. The ActiveX object pipeline still requires the event handler pattern from Method 2 for instant feedback on hover.

TIA Portal WinCC RT Professional Configuration

In TIA Portal V16 and later, WinCC Professional (RT Professional) provides a parallel configuration path under Runtime settings > Screens > Cursor control. According to the official TIA Portal documentation at Configuring the cursor control (Professional) (RT Professional), the cursor control editor lets the integrator define:

  • Cursor movement keys (Tab, arrow keys, custom shortcuts)
  • Initial cursor position on screen load (X/Y coordinates or object-relative)
  • Tab order across screen objects
  • Visibility of the cursor on operator input vs. always visible

The cursor graphic itself (the .cur / .ani file used when the OS cursor is not suppressed) is configured under Runtime settings > General > Cursor in the project tree. The TIA Portal configuration dialog stores the cursor file as a project resource (under \UserFiles\Cursor) rather than referencing an external path. To customize the cursor graphic in TIA Portal:

  1. In the project tree, expand Runtime settings > General.
  2. Double-click Cursor.
  3. In the Cursor editor, browse to a .cur or .ani file. The file is imported into the project at compile time.
  4. Compile the project and download to the runtime station.
  5. Restart WinCC RT Professional.

TIA Portal RT Professional ActiveX controls (including the WinCC Symbol Library and any third-party OCX) follow the same rendering pipeline as WinCC V7; the MouseMove event handler pattern described in Method 2 still applies. The TIA Portal event handler is configured under the object's Properties > Events > Mouse > onMouseMove in the screen editor. The handler is written in JavaScript or VB script and uses the Win32 API through a custom C# action or via the Screen.MousePointer property of the runtime API.

Platform limitation: TIA Portal WinCC Comfort Panels and RT Advanced do not support custom cursor graphics. They use the Windows CE / Windows Embedded Standard 7 cursor resource from the panel firmware and cannot load custom .cur or .ani files. This is a documented platform limitation, not a configuration error.

Registry Considerations and Warnings

WARNING: Editing the Windows registry to change cursor behavior is unsupported by Siemens and not recommended for production WinCC systems. Registry edits persist across WinCC versions, may be overwritten by Windows updates, and can destabilize the GDI subsystem. Always export a full registry backup before any modification, and document every change in the system change log.

WinCC V7 stores its runtime cursor resource references under HKEY_LOCAL_MACHINE\SOFTWARE\Siemens\WinCC\RT\Cursor (and the WOW6432Node equivalent on 64-bit systems). The values are binary HICON handles populated at Runtime startup, not file paths. Manually editing these handles is not equivalent to changing the project-level Mouse Pointer assignment, and any change reverts at the next Runtime restart.

If a customer specifically requests a registry-based override (for example, to deploy a corporate cursor image across all WinCC stations without modifying every project), the supported method is to replace the Windows stock cursor files in %SystemRoot%\Cursors\ and apply the change via Group Policy (User Configuration > Administrative Templates > Control Panel > Personalization > Mouse cursor). WinCC Runtime then loads the corporate cursor through the standard Windows API without any WinCC-specific changes.

Verification Steps

After applying any of the resolution methods above, perform the following verification sequence on the runtime station:

  1. Start WinCC Runtime (Graphics Runtime or RT Professional) and open the affected screen.
  2. Move the mouse over a standard WinCC Button. The configured HAND cursor must appear.
  3. Move the mouse over a standard WinCC I/O field. The same HAND cursor must appear.
  4. Move the mouse over an HMI Symbol Library Valve_S object. The HAND cursor must appear (after Method 2 is applied).
  5. Move the mouse over an HMI Symbol Library Motor_S object. The HAND cursor must appear.
  6. Move the mouse to an empty area of the screen (no object). The HAND cursor must remain (project-level assignment) or revert to default (per-object assignment) consistently.
  7. Click the ActiveX object to confirm the configured action (for example, a valve open/close toggle) still fires correctly. The cursor change must not interfere with click handling.
  8. Restart the entire WinCC Runtime and re-verify. Cursors assigned via Method 2 event handlers may need to be reattached in the project after a WinCC service pack upgrade if the upgrade replaces the Symbol Library COM components.

Troubleshooting Matrix

Symptom Likely Cause Resolution
Cursor not changing on Button or I/O field WinCC Runtime not restarted after configuration change Close and re-open Graphics Runtime; on multi-client stations, restart every client
Cursor not changing on HMI Symbol Library ActiveX (Valve, Motor) ActiveX controls do not respect project-level Mouse Pointer Attach VBS MouseMove event handler (Method 2)
Cursor flickers between HAND and default while moving over ActiveX MouseMove fires repeatedly; cursor reverts when mouse stops Add a MouseEnter handler in addition to MouseMove
Custom .cur file loads but renders with wrong colors or black background 32 bpp .cur on non-Aero Windows Server Provide a 24 bpp .cur variant; test on the actual runtime OS
Custom cursor works in WinCC V7 but not in TIA Portal RT Professional TIA Portal imports cursor as project resource; old file path reference broken Re-import the .cur file in TIA Portal Cursor editor and recompile
Cursor changes on client stations but not server Mouse pointer configuration is computer-specific Edit Computer Properties for the OS server name, not the project default
Cursor reverts to default after Windows update Windows replaced the cursor file under %SystemRoot%\Cursors Re-deploy the corporate cursor via Group Policy; do not store cursor files in %SystemRoot%
Cursor not loading on HiDPI / 4K runtime station .cur file missing the 200% DPI variant Export .cur as multi-resolution (16, 32, 48, 64 px) using IcoFX or Visual Studio Image Library Editor
Custom HAND cursor appears but no click action on ActiveX SetCursor consumed the WM_LBUTTONDOWN message Use SetCursor only on MouseMove; let WinCC dispatch click events normally

Minimum Engineering Workstation and Runtime Requirements

Component Minimum Recommended
WinCC V7 (Engineering) V7.0 SP3 V7.5 SP2 Update 10 or later
WinCC V7 (Runtime) V7.0 SP3 Match the engineering version exactly
TIA Portal V16 Update 5 V18 Update 2 or later
WinCC Professional (RT Professional) V16 V18 or later
Windows (Engineering) Windows 10 1909 LTSC Windows 10 21H2 LTSC or Windows 11 23H2
Windows (Runtime) Windows Server 2016 Windows Server 2019 or 2022 LTSC
Symbol Library V7.0 Match the WinCC version exactly
IcoFX (for multi-res .cur generation) 1.8 1.9 or later

Known Limitations

  • WinCC Comfort Panels and WinCC RT Advanced do not support custom cursor graphics. The cursor is provided by the panel firmware.
  • WinCC V7 on Windows Server Core editions (Server 2019 Core, Server 2022 Core) cannot load 32 bpp alpha .cur files reliably. Use 24 bpp.
  • Some third-party ActiveX controls (for example, .NET-based controls hosted via the WinCC .NET bridge) ignore the MouseMove event entirely. For these, the cursor cannot be customized; document this as a limitation in the customer HMI specification.
  • The TIA Portal Cursor editor does not support animated .ani cursors; only static .cur files.
  • The HMIRuntime.Screens("Screen").MousePointer enum value for the HAND cursor varies by WinCC version; verify the value in a test screen before production deployment.

FAQ

Why does my custom HAND cursor appear on WinCC buttons but not on HMI Symbol Library valves?

HMI Symbol Library objects are ActiveX controls that implement their own mouse cursor rendering and bypass the WinCC project-level Mouse Pointer configuration. The configured HAND cursor is applied by the WinCC graphics runtime's WM_SETCURSOR handler, which ActiveX controls do not invoke. Attach a VBS MouseMove event handler to each ActiveX object that calls SetCursor / LoadCursorFromFile, as documented in Resolution Method 2 above.

Do I need to restart WinCC Runtime for the cursor change to take effect?

Yes. Cursor changes in Computer Properties > Runtime > Mouse Pointer apply only after WinCC Runtime is fully closed and reopened. On multi-client installations, every client station must be restarted independently because cursor assignments are computer-specific, not project-specific.

Can I use an animated .ani cursor in WinCC V7?

Yes. WinCC V7 uses the Windows LoadCursorFromFile API and supports both .cur (static) and .ani (animated) cursors. Reference the .ani file from a WinCC text tag bound to the Mouse Pointer dropdown, as documented in Siemens KB article 15222441. TIA Portal WinCC RT Professional does not support .ani files; use static .cur only.

How do I customize the cursor on a TIA Portal WinCC Comfort Panel?

You cannot. Comfort Panels use a fixed cursor resource embedded in the panel firmware. WinCC RT Advanced (which includes Comfort Panels and RT Advanced runtime) does not expose a project-level cursor configuration. To customize the cursor visible to operators, the operator PC must run WinCC RT Professional, which supports custom .cur files imported into the project.

Is it safe to edit the Windows registry to change the WinCC cursor?

No. Siemens does not support registry-level cursor overrides for WinCC. Registry edits are reverted at every WinCC Runtime restart and may destabilize the GDI subsystem if applied to a running Runtime. Use the supported Computer Properties > Runtime > Mouse Pointer configuration or the MouseMove VBS event handler pattern instead.

Back to blog