int upDownWidth = OS.GetSystemMetrics (OS.SM_CXVSCROLL); int textWidth = width - upDownWidth; int flags = OS.SWP_NOZORDER | OS.SWP_DRAWFRAME | OS.SWP_NOACTIVATE; SetWindowPos (hwndText, 0, 0, 0, textWidth, height, flags); SetWindowPos (hwndUpDown, 0, textWidth, 0, upDownWidth, height, flags);
int upDownWidth = OS.GetSystemMetrics (OS.SM_CXVSCROLL); int textWidth = width - upDownWidth; int border = OS.GetSystemMetrics (OS.SM_CXEDGE); int flags = OS.SWP_NOZORDER | OS.SWP_DRAWFRAME | OS.SWP_NOACTIVATE; SetWindowPos (hwndText, 0, 0, 0, textWidth + border, height, flags); SetWindowPos (hwndUpDown, 0, textWidth, 0, upDownWidth, height, flags);
LRESULT WM_SIZE (int wParam, int lParam) {	LRESULT result = super.WM_SIZE (wParam, lParam);	if (isDisposed ()) return result;	int width = lParam & 0xFFFF, height = lParam >> 16;    int upDownWidth = OS.GetSystemMetrics (OS.SM_CXVSCROLL);    int textWidth = width - upDownWidth;    int flags = OS.SWP_NOZORDER | OS.SWP_DRAWFRAME | OS.SWP_NOACTIVATE;        SetWindowPos (hwndText, 0, 0, 0, textWidth, height, flags);    SetWindowPos (hwndUpDown, 0, textWidth, 0, upDownWidth, height, flags);              		return result;}