fsState &= ~OS.TBSTATE_CHECKED; if (selected) fsState |= OS.TBSTATE_CHECKED;
if (((fsState & OS.TBSTATE_CHECKED) != 0) == selected) return; if (selected) { fsState |= OS.TBSTATE_CHECKED; } else { fsState &= ~OS.TBSTATE_CHECKED; }
public void setSelection (boolean selected) {	checkWidget();	if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return;	int hwnd = parent.handle;	int fsState = OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);	fsState &= ~OS.TBSTATE_CHECKED;	if (selected) fsState |= OS.TBSTATE_CHECKED;	OS.SendMessage (hwnd, OS.TB_SETSTATE, id, fsState);}