12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- #include "dialog.h"
- #include <QApplication>
- //typedef HWND(WINAPI *PROCGETCONSOLEWINDOW)();
- //PROCGETCONSOLEWINDOW GetConsoleWindowAPI;
- //int iNum = 0;
- #define ISAPI_OUT_LEN 3 * 1024 * 1024
- #define ISAPI_STATUS_LEN 8*1024
- //时间解析宏定义
- #define GET_YEAR(_time_) (((_time_)>>26) + 2000)
- #define GET_MONTH(_time_) (((_time_)>>22) & 15)
- #define GET_DAY(_time_) (((_time_)>>17) & 31)
- #define GET_HOUR(_time_) (((_time_)>>12) & 31)
- #define GET_MINUTE(_time_) (((_time_)>>6) & 63)
- #define GET_SECOND(_time_) (((_time_)>>0) & 63)
- int main(int argc, char *argv[])
- {
- // QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
- QApplication a(argc, argv);
- Dialog w;
- // NET_DVR_Init();
- w.show();
- //---------------------------------------
- // 初始化
- // NET_DVR_Init();
- // //设置连接时间与重连时间
- // NET_DVR_SetConnectTime(2000, 1);
- // NET_DVR_SetReconnect(10000, true);
- //---------------------------------------
- //设置异常消息回调函数
- // NET_DVR_SetExceptionCallBack_V30(0, NULL, g_ExceptionCallBack, NULL);
- //---------------------------------------
- // 获取控制台窗口句柄
- //HMODULE hKernel32 = GetModuleHandle("kernel32");
- // GetConsoleWindowAPI = (PROCGETCONSOLEWINDOW)GetProcAddress(hKernel32, "GetConsoleWindow");
- //设置中文字体
- a.setFont(QFont("Microsoft Yahei", 9));
- //设置中文编码
- // #if (QT_VERSION <= QT_VERSION_CHECK(5,0,0))
- // #if _MSC_VER
- // QTextCodec *codec = QTextCodec::codecForName("GBK");
- // #else
- // QTextCodec *codec = QTextCodec::codecForName("UTF-8");
- // #endif
- // QTextCodec::setCodecForLocale(codec);
- // QTextCodec::setCodecForCStrings(codec);
- // QTextCodec::setCodecForTr(codec);
- // #else
- // QTextCodec *codec = QTextCodec::codecForName("UTF-8");
- // QTextCodec::setCodecForLocale(codec);
- // #endif
- return a.exec();
- }
|