Prevent resizing a Views window

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Prevent resizing a Views window

Postby carrxra » Thu Feb 29, 2024 2:30 pm

I'm looking for a way to prevent resizing a frameless Views window by dragging the window borders. I tried clearing the WS_THICKBORDER flag (I'm on Windows), but this flag isn't present on the window in the first place. Is this possible?
carrxra
Newbie
 
Posts: 2
Joined: Sun Dec 17, 2023 7:12 pm

Re: Prevent resizing a Views window

Postby carrxra » Thu Feb 29, 2024 2:39 pm

I figured it out. Needed to override CefWindowDelegate#CanResize.
carrxra
Newbie
 
Posts: 2
Joined: Sun Dec 17, 2023 7:12 pm

Re: Prevent resizing a Views window

Postby ndesktop » Thu Feb 29, 2024 4:05 pm

Or handle WM_NCHITTEST and return HTCLIENT.
ndesktop
Master
 
Posts: 756
Joined: Thu Dec 03, 2015 10:10 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 144 guests