c++ - WM_MBUTTONDOWN doesn't work -


i use wm_mbuttondown keep track of middle mouse button when it's pressed. so, when click middle mouse button @ mouse wheel, display message on console. wonder why doesn't work. wm_mbuttondown usage?

lresult callback ui::windowprocedure(hwnd hwnd, uint message, wparam wparam, lparam lparam) {     switch(message)     {         //  message post when destroy window.     case wm_destroy:         postquitmessage(0);         break;      case wm_mbuttondown:         cout << "middle button clicked" << endl;         break;            // default handling other messages.     default:         return defwindowproc(hwnd, message, wparam, lparam);     }     return 0; } 

output: output

mouse used: logitech

this looks driver issue. on mice wm_mbuttondown message not received. make sure use mouse driver supports middle button.

check if middle button works in other applications - if not, driver issue.


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -