@Override LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) { switch (hdr.code) { case OS.UDN_DELTAPOS: NMUPDOWN lpnmud = new NMUPDOWN (); OS.MoveMemory (lpnmud, lParam, NMUPDOWN.sizeof); int value = lpnmud.iPos + lpnmud.iDelta; int [] max = new int [1], min = new int [1]; OS.SendMessage (hwndUpDown , OS.UDM_GETRANGE32, min, max); if ((style & SWT.WRAP) != 0) { if (value < min [0]) value = max [0]; if (value > max [0]) value = min [0]; } /* * The SWT.Modify event is sent after the widget has been * updated with the new state. Rather than allowing * the default updown window proc to set the value * when the user clicks on the updown control, set * the value explicitly and stop the window proc * from running. */ value = Math.min (Math.max (min [0], value), max [0]); if (value != lpnmud.iPos) { setSelection (value, true, true, true); } return LRESULT.ONE; } return super.wmNotifyChild (hdr, wParam, lParam); }
return super.wmNotifyChild (hdr, wParam, lParam);
@Override LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) { int code = hdr.code; switch (code) { case OS.TCN_SELCHANGE: case OS.TCN_SELCHANGING: TabItem item = null; int index = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0); if (index != -1) item = items [index]; if (item != null) { Control control = item.control; if (control != null && !control.isDisposed ()) { if (code == OS.TCN_SELCHANGE) { control.setBoundsInPixels (getClientAreaInPixels ()); } control.setVisible (code == OS.TCN_SELCHANGE); } } if (code == OS.TCN_SELCHANGE) { Event event = new Event (); event.item = item; sendSelectionEvent (SWT.Selection, event, false); } } return super.wmNotifyChild (hdr, wParam, lParam); }
return super.wmNotifyChild (hdr, wParam, lParam);
return super.wmNotifyChild (hdr, wParam, lParam);
return super.wmNotifyChild (hdr, wParam, lParam);
return super.wmNotifyChild (hdr, wParam, lParam);