I have an MFC dialog which displays an image. I added this code
CDialogEx::OnInitDialog();
SetWindowLong(this->m_hWnd, GWL_STYLE, GetWindowLong(this->m_hWnd, GWL_STYLE) | WS_MINIMIZEBOX | WS_MAXIMIZEBOX |WS_CLOSE);
but I still don't get a close button on title bar. Please tell me how to get a close button.
Use the WS_SYSMENU
style instead of WS_CLOSE
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With