#include #include #include #include /////////////////////////////////////////////////////////// // Testfil /////////////////////////////////////////////////////////// class TTest_application : public TApplication { protected: bool create() { dispatch_e_menu(BAR_ITEM(1)); return TRUE; } bool destroy() { return TRUE; } bool menu(MENU_TAG); public: TTest_application() {} }; bool TTest_application::menu(MENU_TAG) { TLocalisamfile tab(LF_TABCOM); const TRecnotype n = tab.items(); TProgind p(n, "Lettura file tabelle comuni", TRUE, TRUE, 32); const time_t start = time(NULL); TRecnotype r = 1; TString80 msg; for (tab.first(); tab.good(); tab.next(), r++) { msg.format("%ld rec : %ld sec", r, time(NULL) - start); p.addstatus(1); p.set_text(msg); if (p.iscancelled()) break; } return TRUE; } /////////////////////////////////////////////////////////// int ba1200(int argc, char** argv) { TTest_application a; a.run(argc, argv, "Test File"); return 0; }