From b46779ee1efc0fa1ab57a00a7fb1298add08a3e1 Mon Sep 17 00:00:00 2001 From: Mike Stroyan Date: Mon, 15 Jun 2015 14:20:13 -0600 Subject: demos: cube: use AdjustWindowRect for window size This makes renderable area size consistent. --- demos/cube.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/demos/cube.c b/demos/cube.c index e209917f..45db5526 100644 --- a/demos/cube.c +++ b/demos/cube.c @@ -1659,6 +1659,8 @@ static void demo_create_window(struct demo *demo) exit(1); } // Create window with the registered class: + RECT wr = { 0, 0, demo->width, demo->height }; + AdjustWindowRect(&wr, WS_OVERLAPPEDWINDOW, FALSE); demo->window = CreateWindowEx(0, demo->name, // class name demo->name, // app name @@ -1666,8 +1668,8 @@ static void demo_create_window(struct demo *demo) WS_VISIBLE | WS_SYSMENU, 100,100, // x/y coords - demo->width, // width - demo->height, // height + wr.right-wr.left, // width + wr.bottom-wr.top, // height NULL, // handle to parent NULL, // handle to menu demo->connection, // hInstance -- cgit v1.2.3