OfficeAssistant_Win10/OfficeAssistant_msvc/main.cpp

22 lines
480 B
C++
Raw Normal View History

#include "mainwindow.h"
#include <QApplication>
#include <Windows.h>
double scale;
2023-08-13 12:16:22 +08:00
bool autostart = false;
bool agree = false;
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
2023-08-13 12:16:22 +08:00
QStringList args = a.arguments();
if(args.contains("autostart"))
{
autostart = true;
}
HDC hdc = GetDC(NULL);
scale = GetDeviceCaps(hdc, LOGPIXELSX)/96;
ReleaseDC(NULL,hdc);
MainWindow w;
w.show();
return a.exec();
}