Win32 GUI: Resize Dialog Box

I have a basic Win32 dialog application. How to resize?

If it were a window, it would be possible by default (and it would start WM_SIZE). I am new to dialogs, and I can’t understand how: 1. When the mouse is over the edge, it should change to IDC_SIZEWE or IDC_SIZENS, 2. just change the size of the dialog box, I know how to place the dialog content.

+3
source share
3 answers

You do not need to do the work of moving the cursor to the edge yourself, there is only a style that you need to set in the .rc file or in the dialog editor.

: , .

.rc : | WS_THICKFRAME STYLE

+1

?

, MFC, , , , WS_THICKFRAME/WS_SIZEBOX . , - .

, CreateWindow/CreateWindowEx . , WS_OVERLAPPED, .

@MSDN
CreateWindowEx @MSDN

0

Note. I tried to do this by calling ModifyStyle () in a window in onInit (). However, this will not work. You get a resize cursor, but the size does not change.

This, apparently, should be installed in the RC file or, possibly, in the archive.

0
source

Source: https://habr.com/ru/post/1732192/


All Articles