
UpdateData(TRUE);			// get data from the GUI
	if(m_strDeviceAddress.Find("0x") == -1) m_strDeviceAddress = "0x" + m_strDeviceAddress;
	byte byValue1 = ((DWORD)strtoul(m_strDeviceAddress, NULL, 16) <256)? (DWORD)strtoul(m_strDeviceAddress, NULL, 16) :255;
								//	strtoul converst a string into an unsigned-long-integer -- string which must be converted, 
								//  If endptr is not NULL, a pointer to the character that stopped the scan is stored at the location pointed to by endptr,
								// it stops reading in till it finds a value larger than expressed, this case 16.
	byValue1 = (byValue1 >0) ? byValue1 :0;		// ? is kind of if statement if (...) is true than x : else y
    
	
	UpdateData(TRUE);			// get data from the GUI
	byte byValue2 = ((DWORD)strtoul(m_strDeviceAddress, NULL, 16) <256)? (DWORD)strtoul(m_strDeviceAddress, NULL, 16) :255;
								//	strtoul converst a string into an unsigned-long-integer -- string which must be converted, 
								//  If endptr is not NULL, a pointer to the character that stopped the scan is stored at the location pointed to by endptr,
								// it stops reading in till it finds a value larger than expressed, this case 16.
	byValue2 = (byValue2 >0) ? byValue2 :0;		// ? is kind of if statement if (...) is true than x : else y
    

	m_strDeviceAddress.Format("0x%x%y",byValue1, byValue2);	// herewith you put it back in edit box with 0x and than the hex value
	UpdateData(FALSE);
	device = (byValue1, byValue2);
