How do i find out whether a mouse button is down or not at any time and not only the moment it's clicked? I tried making a bool variable that get changed to true when the window procedure function is called with WM_LBUTTONDOWN and to false in the case of WM_LBUTTONUP but it wont get the WM_LBUTTONUP message when i bring up a modal dialog box.