if ((style & SWT.NO_TRIM) != 0) { style &= ~(SWT.CLOSE | SWT.TITLE | SWT.MIN | SWT.MAX | SWT.RESIZE | SWT.BORDER); } if ((style & (SWT.MENU | SWT.MIN | SWT.MAX | SWT.CLOSE)) != 0) { style |= SWT.TITLE; }
static int checkStyle (int style) {	if (OS.IsWinCE) {		/*		* Feature in WinCE PPC.  WS_MINIMIZEBOX or WS_MAXIMIZEBOX		* are not supposed to be used.  If they are, the result		* is a button which does not repaint correctly.  The fix		* is to remove this style.		*/		if ((style & SWT.MIN) != 0) style &= ~SWT.MIN;		if ((style & SWT.MAX) != 0) style &= ~SWT.MAX;		return style;	}	/*	* If either WS_MINIMIZEBOX or WS_MAXIMIZEBOX are set,	* we must also set WS_SYSMENU or the buttons will not	* appear.	*/	if ((style & (SWT.MIN | SWT.MAX)) != 0) style |= SWT.CLOSE;		/*	* Both WS_SYSMENU and WS_CAPTION must be set in order	* to for the system menu to appear.	*/	if ((style & SWT.CLOSE) != 0) style |= SWT.TITLE;		/*	* Bug in Windows.  The WS_CAPTION style must be	* set when the window is resizable or it does not	* draw properly.	*/	/*	* This code is intentionally commented.  It seems	* that this problem originally in Windows 3.11,	* has been fixed in later versions.  Because the	* exact nature of the drawing problem is unknown,	* keep the commented code around in case it comes	* back.	*///	if ((style & SWT.RESIZE) != 0) style |= SWT.TITLE;		return style;}