Hi, I found out accidentally, that using the SetWindowPos to the MainFrm window inside the OnCreateClient it solves the problem. It seems that setting the attribute that does not change the Z-Order of the main window keeps it always in the top.
SetWindowPos(NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_FRAMECHANGED);
What do you think ? Regards,
sdancer75