Child Window with Limited Resizing
I want to create a开发者_如何转开发 child window that takes up all the space of the left side of main window, but its minimum width is 128 pixels. I also want it to be resizable, but only on the right edge, and makes sure that the width stays at the minimum of 128. Creating the child window with these styles: WS_EX_STATICEDGE, WS_SIZEBOX|WS_CHILD|WS_VISIBLE and handling the WM_NCHITTEST message, I can make it only resizable on the right edge. But I can't make it so the minimum width stays at 128. Can somebody tell me how to do this or if there's another window class that takes care of all this?
You must handle the messages which resize the window: WM_POSCHANGING
, WM_SIZING
, WM_SIZE
and WM_POSCHANGED
. The most important is to handle WM_SIZING
for good user experience.
精彩评论