I am a beginner on win32-platform, and there is some question about
BOOL GetMessage(LPMSG lpMsg,HWND hWnd,UINT wMsgFilterMin,UINT wMsgFilterMax) ;
I don’t know what does it wMsgFilterMin and wMsgFilterMax means ? Thank you …..
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First off, keep in mind that GetMessage() only returns posted messages. There are not many of them, mouse and keyboard messages, WM_INPUT, WM_TIMER, WM_PAINT, WM_QUIT. Plus any that your own code delivers by calling PostMessage(), WM_USER+ messages.
Using the filter is pretty unusual, you normally pass 0 and 0 so nothing gets filtered. You might consider passing WM_PAINT to flush all pending paint requests. I can think of no good reason to ever filter mouse or keyboard messages. But a definite use-case is your own posted messages. Commonly used to deliver notifications from a worker thread to the UI thread for example. You may want to filter them so they get processed before any of the regular messages.
Just put this in your back pocket. You may have a use for it some day.