Hi, 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?
+1
A:
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.
Heath Hunnicutt
2010-07-29 00:27:08
Ah, thanks. WM_SIZING is perfect.
kaykun
2010-07-29 00:47:45