I have just started learning how to program Windows GUI’s using the low level Win32 API and C++ so please bear with me.
I have a message box which is displayed at one point and as you can see below it is set to an OK/Cancel box
MessageBox(hWnd, L"Hello", L"Caption", MB_OKCANCEL);
My question is, how do you check which of the two (or possibly more) buttons were pressed and act accordingly?
Thank you
Tom
Look at the MessageBox description. The return type is the value of the button clicked. For example,
IDOKwhen the user pressed the “OK” button.