I totally completed my menu code. My menu is now a complete emulation of a windows menu. But my menu only supports the keyboard input and now I want to write a code for the mouse support too, but I don't have a clue how to write it.
For keyboard support I was writting in this style:
I just want an example for the mouse. Thanks!Code:HANDLE hInput; INPUT_RECORD ir; DWORD dwRead; BOOL Loop; hInput = GetStdHandle (STD_INPUT_HANDLE); while (Loop) { if ( ReadConsoleInput(hInput, &ir, 1, &dwRead) && (ir.EventType == KEY_EVENT) && (ir.Event.KeyEvent.bKeyDown) ) { switch (ir.Event.KeyEvent.wVirtualKeyCode) { case VK_RETURN: Loop = FALSE; } } }
BTW: I'm writting a win32 console application and I'm using VC++ 6.0 compiler on Win98.



LinkBack URL
About LinkBacks


