I guess axon's idea sort of messed up the idea of making ths a usefull thread, huh ILoveVectors?
Anyhow, everything starts somewhere...
I thought this might be usefull:
Code:
HWND TimeEdit; // Edit box that number is inputted
int num; // Maximum digits in number
char TransStart[num]; // Numer that is inputed in editbox
int Countdown ; // Resualt number transalation
GetWindowText(TimeEdit, TransStart, num);
int Do;
for(Countdown = 0, Do = 0; Do < num; Do++){
if(TransStart[Do + 1] == '\0'){
Countdown = Countdown + TransStart[Do] - '\x30';
Do = 100; }
else{
Countdown = Countdown + TransStart[Do] - '\x30';
Countdown = Countdown * 10; } }
It converts a number in character format into int number format.