I am beginner in MFC. I have created a window using MFC framework - CFrameWnd, CDocument and CView. For this window I need to disable Maximize button from system menu after window is created. But I am not able to find the solution for it. I have tried with below solution, but its not working:
CWnd *poWnd= AfxGetMainWnd();
HWND oHwnd = poWnd->GetSafeHwnd();
SetWindowLong(oHwnd, GWL_STYLE, GetWindowLong(oHwnd, GWL_STYLE) & ~WS_MAXIMIZEBOX);
Can anyone please let me know how to achieve it?