❄️🎁⛄ The Winter Games Tournament is Live! 🎄🎅❄️
Jump to content

WINDOW_RESIZABLE crashes game


Go to solution Solved by Canardia,

Recommended Posts

Posted

Without the WINDOW_RESIZABLE it works:

int w = 1920/2;
int h = 1080/2;
auto style = WINDOW_CENTER | WINDOW_TITLEBAR | WINDOW_RESIZABLE;

 

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Posted

Is there any other way to maximize a window, like pressing the maximize button on title bar?
I need it only once when the window is created, before I create the framebuffer.
It should look like this (the windows 11 titlebar is visible below the window):
image.thumb.png.ba2dd1e4387303e40e39a281af78a6f4.png

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Posted

The thing is, I don't need to resize the window, I only want it be in maximized mode when it's created. In maximized mode the title bar gets thinner.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

  • Solution
Posted

I found a workaround which is actually better than having a thin title bar:image.thumb.png.4e6aaa8c0e5ad5b6a1953944289ed4f1.png

int w = 1920;
int h = 1080-48;
auto style = (WindowStyles)0x00000000L;

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Posted

There is an Initialize() command in C++ that can accept a structure, with a setting to disable multithreading. This will allow a framebuffer to be created on a resizable window, but it's not good for performance. I don't recommend using this for games, only for GUI-driven windowed applications.

Let's build cool stuff and have fun. :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...