Sometimes, when I use ShowWindow(SW_SHOWMAXIMIZED), my MFC window is maximized, but it is not positioned at coordinates (0, 0), as it should, it is moved down, for around 30-40 pixels. Any tip on what might be wrong?
MFC window maximized, but to wrong top coordinate
408 views Asked by Obucinac At
1
I found the solution. In PreCreateWindow(CREATESTRUCT& cs), CREATESTRUCT was modified, like this
Apparently, this was causing wrong WINDOWPLACEMENT coordinates. When changed to:
with call to
Everything worked fine.