Time Entry control...
Reza Razavipour -- biles.com!reza_r@jabberwock.biles.com Monday, May 13, 1996 VC4.1 on NT 3.5.1 patch level 4. Can anybody shed some light on the anatomy of the Time Data Entry control, like when we set system time for NT or even Windows 3.1. It looks like a set of edit controls seperated by slashes, all tabbable, all controled by one spin control. Any hints or sample code is appreciated.
Mike Blaszczak -- mikeblas@msn.com Wednesday, May 15, 1996 [Mini-digest: 3 responses] > VC4.1 on NT 3.5.1 patch level 4. Thanks. > Can anybody shed some light on the anatomy of the Time Data Entry control, like > when we set system time for NT or even Windows 3.1. > It looks like a set of edit controls seperated by slashes, all tabbable, all > controled by one spin control. That's exatcly what it is. Maybe, some future version of Windows will make a time/date control available in some interesting, reusable form. In the meantime, some companies make such controls available as OLE Controls. .B ekiM TCHAR szPolice[] = _T("I sure hope my leg don't break walking on the moon."); -----From: Deepak SaxenaIt's actually fairly simple to do. Set up your controls like this: edit1 static("/") edit2 static("/") edit3 spinbutton Give no borders to any of the above ctrls and then put a big static ctrl. around them to make it look like a single ctrl. to the user. Now, when you create this window, don't autobuddy the spinctrl yet. What you want to do in your dialog class is capture setfocus notify for each of the edit ctrls. you then set the focused edit ctrl. as the buddy window for the spin ctrl. and set the range for the spin ctrl appropriatly. Upon loosing focus to a ctrl. other then one of these three edit ctrls or the spin button, disconnect the spin control from a buddy window. If you want to automatically want to wrap to the next month once the user spins past the last day, just capture the UDN_POSCHANING notitfication mesg. and check to see if you need to change the other edit ctrl. positions depending on what the current one is set to. You will have to do this to change the number of days allowable anyways. Deepak -----From: John Moulder There is an example called picedit on the developer network cdrom.
| Вернуться в корень Архива |