qt 5.8 & dpi functions

This commit is contained in:
Oleg Korshul
2017-03-14 13:35:19 +03:00
parent 993dc19e3f
commit f023cfd2ab
3 changed files with 7 additions and 1 deletions

View File

@ -106,6 +106,8 @@ linux-g++ {
win32 {
DEFINES += JAS_WIN_MSVC_BUILD WIN32
DEFINES += WIN32
RC_ICONS += ./res/icons/desktop_icons.ico
HEADERS += $$PWD/src/win/mainwindow.h \

View File

@ -64,6 +64,10 @@ BYTE g_dpi_ratio = 1;
int main( int argc, char *argv[] )
{
#ifdef _WIN32
Core_SetProcessDpiAwareness();
#endif
QString user_data_path = Utils::getUserPath() + APP_DATA_PATH;
auto setup_paths = [&user_data_path](CAscApplicationManager * manager) {

View File

@ -187,7 +187,7 @@ bool QWinHost::event(QEvent *e)
case QEvent::Polish:
if (!hwnd)
{
hwnd = createWindow((HWND)winId(), qWinAppInst());
hwnd = createWindow((HWND)winId(), GetModuleHandle(0));
fixParent();
own_hwnd = hwnd != 0;
}