From: qfel on 5 Aug 2007 05:54 When I write simple console app, there is no reaction when I click right mouse button. When I start cmd.exe, it displays simple menu, when I start powershell.exe, it just pastes from clipboard on right-click. So I thought mouse menu and selection support is done by console shell that starts the console (when I start cmd from within powershell, it still preserves powershel behaviour), although when I kill powershell leaving cmd running alone, nothing changes. How is it implemented?
From: Gary Chanson on 5 Aug 2007 15:07 "qfel" <q_tmp(a)aster.pl> wrote in message news:f946ou$hkv$1(a)inews.gazeta.pl... > When I write simple console app, there is no reaction when I click right > mouse button. When I start cmd.exe, it displays simple menu, when I start > powershell.exe, it just pastes from clipboard on right-click. So I thought > mouse menu and selection support is done by console shell that starts the > console (when I start cmd from within powershell, it still preserves > powershel behaviour), although when I kill powershell leaving cmd running > alone, nothing changes. How is it implemented? You need to get input events using ReadConsoleInput and process the mouse records looking for right button press events. -- - Gary Chanson (Windows SDK MVP) - Abolish Public Schools
From: qfel on 6 Aug 2007 07:39 > You need to get input events using ReadConsoleInput and process the > mouse > records looking for right button press events. If I run app like this from cmd.exe, it does not get any mouse input, but some (not all) keyboard input can be read - looks like cmd has some special way of handling mouse, since ReadConsoleInput seems to return input to whoever calls it first.
From: Gary Chanson on 6 Aug 2007 10:46 "qfel" <q_tmp(a)aster.pl> wrote in message news:f97190$19q$1(a)inews.gazeta.pl... > > You need to get input events using ReadConsoleInput and process the > > mouse > > records looking for right button press events. > > If I run app like this from cmd.exe, it does not get any mouse input, but > some (not all) keyboard input can be read - looks like cmd has some special > way of handling mouse, since ReadConsoleInput seems to return input to > whoever calls it first. Turn off QuickEdit for that console window. -- - Gary Chanson (Windows SDK MVP) - Abolish Public Schools
From: Uwe Sieber on 6 Aug 2007 13:16 qfel wrote: > When I write simple console app, there is no reaction when I click right > mouse button. When I start cmd.exe, it displays simple menu, when I > start powershell.exe, it just pastes from clipboard on right-click. So I > thought mouse menu and selection support is done by console shell that > starts the console (when I start cmd from within powershell, it still > preserves powershel behaviour), although when I kill powershell leaving > cmd running alone, nothing changes. How is it implemented? I think the behaviour depends on the console settings as 'QuickEdit' and 'InsertMode'. They can be changed from code by some undocumented fuctions. catch22.net shows how: http://www.catch22.net/source/files/setconsoleinfo.c Greetings from Germany Uwe
|
Pages: 1 Prev: SwitchDesktop after first login Next: Volume Shadow Copy - BackupComplete and VSS_E_BAD_STATE |