Click here to Skip to main content
16,006,065 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Phone Bill Pin
Autunmsky25-Nov-02 14:59
Autunmsky25-Nov-02 14:59 
GeneralRe: Phone Bill Pin
Christian Graus25-Nov-02 15:06
protectorChristian Graus25-Nov-02 15:06 
GeneralRe: Phone Bill Pin
Autunmsky25-Nov-02 15:31
Autunmsky25-Nov-02 15:31 
GeneralRe: Phone Bill Pin
Christian Graus25-Nov-02 15:39
protectorChristian Graus25-Nov-02 15:39 
GeneralRe: Phone Bill Pin
Autunmsky25-Nov-02 15:48
Autunmsky25-Nov-02 15:48 
GeneralRe: Phone Bill Pin
Christian Graus25-Nov-02 15:57
protectorChristian Graus25-Nov-02 15:57 
GeneralRe: Phone Bill Pin
Autunmsky25-Nov-02 16:09
Autunmsky25-Nov-02 16:09 
GeneralRe: Phone Bill Pin
Christian Graus25-Nov-02 16:15
protectorChristian Graus25-Nov-02 16:15 
Your system overall is very fragile, I personally would have strings entered and then look for spaces or : or ., before chopping up the numbers. But it will work like this, just make sure the number is no more than 4 digits long, then to get the minutes you would say

minutes = total & 99;

and

hours = total - minutes;

I believe that's right, anyhow.

Once you have minutes and seconds, I would be more inclined to have the UI report an invalid number and ask again, because it's unlikely someone would deliberately enter 1375 for 2:15 pm, but if you prefer to roll the values around, yes that is how I would do it.


Christian

No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002

Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002

Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
GeneralRe: Phone Bill Pin
Autunmsky25-Nov-02 16:27
Autunmsky25-Nov-02 16:27 
GeneralRe: Phone Bill Pin
Autunmsky25-Nov-02 16:34
Autunmsky25-Nov-02 16:34 
GeneralRe: Phone Bill Pin
Christian Graus25-Nov-02 16:40
protectorChristian Graus25-Nov-02 16:40 
GeneralRe: Phone Bill Pin
Autunmsky25-Nov-02 16:44
Autunmsky25-Nov-02 16:44 
GeneralRe: Phone Bill Pin
Christian Graus25-Nov-02 16:48
protectorChristian Graus25-Nov-02 16:48 
GeneralCreateBitmap problem Pin
Anonymous25-Nov-02 13:16
Anonymous25-Nov-02 13:16 
GeneralRe: CreateBitmap problem Pin
Christian Graus25-Nov-02 13:26
protectorChristian Graus25-Nov-02 13:26 
GeneralRe: CreateBitmap problem Pin
Anonymous25-Nov-02 13:39
Anonymous25-Nov-02 13:39 
GeneralRe: CreateBitmap problem Pin
Christian Graus25-Nov-02 14:35
protectorChristian Graus25-Nov-02 14:35 
GeneralRe: CreateBitmap problem Pin
Anonymous26-Nov-02 3:41
Anonymous26-Nov-02 3:41 
GeneralActiveX control repaint Pin
billhao25-Nov-02 13:14
billhao25-Nov-02 13:14 
GeneralRe: ActiveX control repaint Pin
Roger Allen26-Nov-02 1:45
Roger Allen26-Nov-02 1:45 
GeneralRe: ActiveX control repaint Pin
billhao26-Nov-02 17:07
billhao26-Nov-02 17:07 
GeneralRe: ActiveX control repaint Pin
billhao28-Nov-02 21:47
billhao28-Nov-02 21:47 
GeneralDatabase problem in vc++(ODBC) Pin
MFC is the Best25-Nov-02 12:25
MFC is the Best25-Nov-02 12:25 
GeneralRe: Database problem in vc++(ODBC) Pin
dima_t25-Nov-02 17:19
dima_t25-Nov-02 17:19 
GeneralRe: Database problem in vc++(ODBC) Pin
MFC is the Best25-Nov-02 22:00
MFC is the Best25-Nov-02 22:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.