Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: create a window which fits selected resolution better #306

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions win32drv/win32drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,15 +273,18 @@ EXTERN_C HWND lv_win32_create_display_window(
HICON icon_handle,
int show_window_mode)
{
RECT rect = { 0, 0, hor_res, ver_res };
AdjustWindowRect(&rect, WINDOW_STYLE | WINDOW_EX_STYLE, false);

HWND display_window_handle = CreateWindowExW(
WINDOW_EX_STYLE,
LVGL_SIMULATOR_WINDOW_CLASS,
window_title,
WINDOW_STYLE,
CW_USEDEFAULT,
0,
hor_res,
ver_res,
rect.right - rect.left,
rect.bottom - rect.top,
NULL,
NULL,
instance_handle,
Expand Down