Moin, die Ursache der Abbrüche ist wahrscheinlich:
ZitatitemID
Type: UINT
The menu item identifier for a menu item or the index of the item in a list box or combo box. For an empty list box or combo box, this member can be -1. This allows the application to draw only the focus rectangle at the coordinates specified by the rcItem member even though there are no items in the control. This indicates to the user whether the list box or combo box has the focus. How the bits are set in the itemAction member determines whether the rectangle is to be drawn as though the list box or combo box has the focus.
Weil das Strukturfeld auch im Skript als UInt definiert ist, kommt als Wert 4294967295 an. Für diesen 'Index' kann man die _WM_DRAWITEM Funktion sofort verlassen.