i am using C++ win32 API…
i have a Windows messagebox contain OKCANCEL Button…
the messagebox have a close(X-Button) on the right top…
retun1=MessageBox(hDlg,TEXT("Your password will expired,you must change the password"),TEXT("Logon Message"),MB_OK | MB_ICONINFORMATION);
i only want to close the messagebox using the CANCEL Button…
So,i want to disable the X-Button Icon…
i am already try MB_ICONMASK MB_MODEMASK Somethink like that.
But i cant get it,what i need…
How can i Resolve it?
There’s most likely a bigger problem beyond what you’ve given us, but one way to disable the close button is to set the class style to include
CS_NOCLOSE, which you can do with a window handle andSetClassLongPtr. Consider the following full example: