/*************************************************
         Routines for Up/Down Controls.
 *************************************************/


//  Set Up/Down control position.
//
//  Returns previous value.

LRESULT SetUDPos( HWND hWnd, int v)
{
	return ( SendMessage(
		                 hWnd,
						 UDM_SETPOS,
						 0,
						 (LPARAM)MAKELONG((short)v, 0)
		                )
			) ;
}

// Set up/down control range
void SetUDRng(HWND hWnd, int Hi, int Lo)
{
		SendMessage(hWnd,
		        UDM_SETRANGE,
		        0,
				(LPARAM)MAKELONG((short)Hi,(short)Lo)) ;
}

// Get up/down control position
int GetUDPos(HWND hWnd)
{
	return(
		  (int)LOWORD(SendMessage(
		                          hWnd,
		                          UDM_GETPOS,
								  0,0
		                         )
					  )
		  ) ;
}

