Create a CEdit style control with mouse value adjustment.
$100-500 USD
已完成
已发布超过 18 年前
$100-500 USD
货到付款
Create a numerical UI control by deriving from the MFC CEdit class. The control needs to handle floating point values.
The mouse value adjustment must work as follows:
1) The user clicks down on the control with the left mouse button
2) The user moves the mouse up/down or left/right to adjust the value through its available range. During this movement, the mouse cursor or pointer is hidden. The control must display the current value while dragging and notify the parent of the change.
3) The user releases the left mouse button. At this point, the mouse cursor reappears in the position where the user clicked down.
The mouse adjustments must not be limited by the edges of the screen. For example, if the control is at the bottom of the screen and the value is at the maximum, the user must be able to click and drag downwards and get the entire range of values.
The control must also support all of the CEdit methods for changing the value, including typing it in, pasting from another source, etc. It must also support the CEdit notifications when the value changes, for example, EN_CHANGE.
Please see the deliverables for a list of required functions to implement.
## Deliverables
1) Complete source code of all work done.
2) Deliverables must be in ready-to-compile condition for Visual Studio 2003. Source must compile without warnings or errors.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc.).
Implement the following functions:
void SetValue(FLOAT fValue)
// Changes the value in the control
FLOAT GetValue()
// Returns the current value in the control
void SetPrecision(DWORD dwDigits)
// Specifies how many digits after the decimal point the control will display
void SetMinMax(FLOAT fMin, FLOAT fMax)
// Sets the upper and lower bounds for the value in the control
void SetOrientation(BOOL bVertical)
// Tells the control whether mouse drag movement adjusts the value with horizontal or vertical movement.
void SetThrow(LONG lPixels)
// Indicates the amount of mouse movement (horizontal or vertical) that corresponds to the full range of values in the control.
void IncValue()
// Increase the value in the control by one
void DecValue()
// Decrease the value in the control by one
## Platform
Code must work on Windows XP. Support for Windows 98, ME, and 2000 is desirable but not required.