I have a win32 application, there is an button on the main window.
When i click the mouse left button, i receive the WM_LBUTTONDOWN message, when i release the mouse left button, i receive the WM_LBUTTONUP message, that is normal.
However, if in the processing of message WM_LBUTTONDOWN, (while i am holding the mouse left button), the program show a modal dialog window, the button will never receive the WM_LBUTTONUP.
This becomes an issue because in the WM_LBUTTONDOWN the program did something that needs to be clear up in the WM_LBUTTONUP. Now because of the modal dialog, there is no chance to clear up anymore.
Is there a better way to handle this? I tried SetCapture, seems still can not receive the WM_LBUTTONUP.