Date/Time Control: Fix Display With WS_DISABLED Style

Robert Shearman rob at codeweavers.com
Thu Dec 16 13:32:13 CST 2004


Hi,

Currently, the date/time picker, when disabled, does not react to user 
input and doesn't look disabled to the user. This patch changes the 
drawing to make the control look disabled by drawing with a grey 
background and dark grey text. It also fixes an issue where if the user 
selected field 0 first (i.e. the day in UK time format) then the control 
wouldn't react like it did if any of the others were selected.

Rob

Changelog:
- Implement WM_ENABLE handler to update cached control style when the 
control is disabled.
- Move background drawing into WM_ERASEBKGND handler and draw the 
background differently when disabled.
- Change WM_PAINT handler to draw text with transparent background and 
with the correct colour for the style.
- Initialize selected field to -1 instead of 0 so that the control 
notices when field 0 is selected.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: datetime.diff
Type: text/x-patch
Size: 5012 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20041216/560d72d6/datetime.bin


More information about the wine-patches mailing list