Problem with cascaded controls
-
I created a custom control derived from CWnd. I need to cascade many of these on a CFormView. I am able to create and cascade them but when I click on a portion of the top most control which is over another control, the control underneath receives the mouse input and not the top most one. I tried to disable the previous control but I need to receive WM_ messages for all the cascaded controls. I also tried this with a standard CButton class and the same problem occured. Does anyone know how to prevent this behaviour? Thanks in advance
-
I created a custom control derived from CWnd. I need to cascade many of these on a CFormView. I am able to create and cascade them but when I click on a portion of the top most control which is over another control, the control underneath receives the mouse input and not the top most one. I tried to disable the previous control but I need to receive WM_ messages for all the cascaded controls. I also tried this with a standard CButton class and the same problem occured. Does anyone know how to prevent this behaviour? Thanks in advance
We do seem to have amazingly similar problems in spite of the applications being quite different. My application is for subitem editing of a list control, which also uses overlapped windows. So thank you for mentioning SetWindowPos. There are so many functions like it and the documentation does not make it clear that SetWindowPos would be useful in my situation. I think that something else I would have tried instead is BeginDeferWindowPos, EndDeferWindowPos and DeferWindowPos. I do not understand exactly what they do and how they work but they might be useful when the z-order of multiple windows needs to be specified. Are they not relevant to you situation?