This will be desktop ruler, but project was suspended for a long time. Not completed jet.
This is very good calculation algorithm. I got it from Antanas Vidziunas book "C++ ir C++ Builder pradmenys" and wrote my own and good realization. I used it on AF-CALC 100 project. Algorithm is written in C source file, C and Lithuanian language.
Good calculation algorithmSome years ago I was desided to write a text editor for DOS, but now I think that this project is not worth my effort and it will never be comleted. Probably later I will delete it from everything.
Download source code and executable - do not try to use on important files!#includeResult:#include const char g_szWCName[] = "MainWindowClass"; LRESULT WndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){ WNDCLASSEX wce; HWND hWnd; MSG Msg; const char szs [] = "langas"; wce.cbClsExtra=0; wce.cbSize = sizeof(WNDCLASSEX); wce.cbWndExtra = 0; wce.hbrBackground = (HBRUSH)COLOR_APPWORKSPACE; wce.hCursor = LoadCursor(NULL, IDC_ARROW); wce.hIcon = NULL; wce.hIconSm = NULL; wce.hInstance = hInstance; wce.lpfnWndProc = (WNDPROC)WndProc; wce.lpszClassName = (LPCWSTR)g_szWCName; wce.lpszMenuName = NULL; wce.style = 0; if (!RegisterClassEx(&wce)){ MessageBoxA(NULL, "ERR0", "ERR0", MB_OK | MB_ICONERROR); return 1; } hWnd = CreateWindowEx(WS_EX_APPWINDOW, (LPCWSTR)g_szWCName, _T("TEST"), WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 640, 480, NULL, NULL, hInstance, NULL); if (hWnd == NULL){ MessageBoxA(NULL, "ERR1", "ERR1", MB_OK | MB_ICONERROR); return 1; } ShowWindow(hWnd, nCmdShow); UpdateWindow(hWnd); while(GetMessage(&Msg, hWnd, 0, 0) > 0){ TranslateMessage(&Msg); DispatchMessage(&Msg); } return 0; } LRESULT WndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam){ switch(uMsg){ case WM_PAINT: { PAINTSTRUCT ps; HDC hDC = BeginPaint(hWnd, &ps); TextOut(hDC, 0,0,_T("TEST"),4); EndPaint(hWnd, &ps); } break; default: return DefWindowProc(hWnd, uMsg, wParam, lParam); } return 1; }