----------------------------------- Mr.Begebies Mon Oct 20, 2003 4:31 pm Mouse Input ----------------------------------- I'm confused on how to exactly read mouse input using console functions. Can anyone give a brief example? Thanks. :D ----------------------------------- Tony Mon Oct 20, 2003 4:54 pm ----------------------------------- I doubt you can even read mouse input using console functions :? but I could be wrong. ----------------------------------- Mr.Begebies Mon Oct 20, 2003 6:39 pm ----------------------------------- I figured out how to do it in opengl. Heres the code for anyone who has a similar question: LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_CREATE: return 0; case WM_CLOSE: PostQuitMessage (0); return 0; case WM_DESTROY: return 0; //***Monitors mouse click*** //Ex: WM_LBUTTONDOWN case WM_MOUSEWHEEL: //*Actions go here* return 0; //*** case WM_KEYDOWN: switch (wParam) { case VK_ESCAPE: PostQuitMessage(0); return 0; } return 0; default: return DefWindowProc (hWnd, message, wParam, lParam); } } This function is found near the bottom of your opengl file, you just need to add the part in the commented area. As for 'WM_MOUSEWHEEL' part, thats just the code indicating the mouse event. A good website, and really, the only website to find a full documentation of C++ and opengl commands, is at http://msdn.microsoft.com/library/ ----------------------------------- Dan Mon Oct 20, 2003 10:08 pm ----------------------------------- you can get mouse input in console but you need speicale lib file. i think one comes with the borad land comiplers.