Fix partily of bug 1149, left todo is binary show. Follow thing : Hex, dec, oct should work fine now and convert betwin them
Modified: trunk/reactos/subsys/system/calc/winecalc.c

Modified: trunk/reactos/subsys/system/calc/winecalc.c
--- trunk/reactos/subsys/system/calc/winecalc.c	2005-12-18 12:32:05 UTC (rev 20244)
+++ trunk/reactos/subsys/system/calc/winecalc.c	2005-12-18 16:03:35 UTC (rev 20245)
@@ -2941,19 +2941,29 @@
     TCHAR s[CALC_BUF_SIZE];
     int point=0;
     calcfloat real;
+    static int old_base = NBASE_DECIMAL;
 
+   
     switch (calc->numBase) {
-    case NBASE_HEX:
-        real = calc_atof(calc->buffer, calc->numBase);
-        _stprintf(calc->display, TEXT("%lx"), (long)real);
+    case NBASE_HEX:      
+        real = calc_atof(calc->buffer, old_base);
+        _stprintf(calc->display, _T("%lx"), (long)real);   
+        _stprintf(calc->buffer, _T("%lx"), (long)real);         
+        old_base = NBASE_HEX;        
         break;
 
-    case NBASE_OCTAL:
-        _stprintf(calc->display, TEXT("%lo"), (long)calc->buffer);
+    case NBASE_OCTAL:  
+         real = calc_atof(calc->buffer, old_base);
+        _stprintf(calc->display, TEXT("%lo"), (long)real);
+        _stprintf(calc->buffer, TEXT("%lo"), (long)real);
+        old_base = NBASE_OCTAL;
         break;
 
     case NBASE_BINARY:
-        _stprintf(calc->display, TEXT("%lx"), (long)calc->buffer);
+        real = calc_atof(calc->buffer, old_base);
+
+        _stprintf(calc->display, TEXT("%lx"), (long)real);
+        old_base = NBASE_BINARY;
         break;
 
     case NBASE_DECIMAL:
@@ -3031,7 +3041,9 @@
                 calc->display[0] = 0;
             _tcscat(calc->display, s);
         }
+        old_base = NBASE_DECIMAL;
     }
+   
     InvalidateRect(calc->hWnd, NULL, FALSE);
     UpdateWindow(calc->hWnd);
 }