Click here to Skip to main content
16,011,538 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to define a CALLBACK function Pin
FlyingDancer27-Jul-03 15:53
FlyingDancer27-Jul-03 15:53 
AnswerRe: How to define a CALLBACK function Pin
parths27-Jul-03 16:50
parths27-Jul-03 16:50 
GeneralRe: How to define a CALLBACK function Pin
FlyingDancer27-Jul-03 17:15
FlyingDancer27-Jul-03 17:15 
GeneralRe: How to define a CALLBACK function Pin
parths27-Jul-03 17:40
parths27-Jul-03 17:40 
AnswerRe: How to define a CALLBACK function Pin
geo_m28-Jul-03 20:02
geo_m28-Jul-03 20:02 
GeneralRe: How to define a CALLBACK function Pin
FlyingDancer28-Jul-03 20:26
FlyingDancer28-Jul-03 20:26 
GeneralMultiple Document Support Opening Problem Pin
bneacetp27-Jul-03 15:26
bneacetp27-Jul-03 15:26 
GeneralSending non-keyboard chars Pin
phlipping27-Jul-03 13:56
phlipping27-Jul-03 13:56 
Come ON, someone out there must know this...

How can you send a char that's not on the keyboard using SendInput?

To type '¯', for example, you hold alt and type 0175 on the num pad.
So I guessed this, but it doesn't work Frown | :(
int i;
INPUT input[10];
ZeroMemory(input, sizeof(input));
for (i = 0; i < 10; i++)
  input[i].type = INPUT_KEYBOARD;
input[0].ki.wVk = 18; //there doesn't seem to be a VK_ALT
input[1].ki.wVk = input[2].ki.wVk = 0x60; //num0
input[3].ki.wVk = input[4].ki.wVk = 0x61; //num1
input[5].ki.wVk = input[6].ki.wVk = 0x67; //num7
input[7].ki.wVk = input[8].ki.wVk = 0x65; //num5
input[9].ki.wVk = 18;
input[2].ki.dwFlags = input[4].ki.dwFlags = input[6].ki.dwFlags =
  input[8].ki.dwFlags = input[9].ki.dwFlags = KEYEVENTF_KEYUP;
SendInput(10, input, sizeof(INPUT));
using a keyboard logger, i can see that it does exactly what I want, ie press alt, type 0175, release alt, but it doesn't send '¯' to the active app
Confused | :confused: Confused | :confused:
Any ideas?

Any method to simulate the typing of ¯ to the active app will be fine - not necessarily SendInput(), that's just what i have used do far.

thanks in advance

=====
Phlip

Always proofread carefully to see if you any words out
GeneralRe: Sending non-keyboard chars Pin
Michael Dunn27-Jul-03 14:37
sitebuilderMichael Dunn27-Jul-03 14:37 
GeneralRe: Sending non-keyboard chars Pin
phlipping27-Jul-03 14:44
phlipping27-Jul-03 14:44 
GeneralRe: Sending non-keyboard chars Pin
Abin27-Jul-03 15:11
Abin27-Jul-03 15:11 
GeneralRe: Sending non-keyboard chars Pin
phlipping27-Jul-03 15:25
phlipping27-Jul-03 15:25 
GeneralRe: Sending non-keyboard chars Pin
Beer2627-Jul-03 15:51
Beer2627-Jul-03 15:51 
GeneralRe: Sending non-keyboard chars Pin
phlipping27-Jul-03 16:48
phlipping27-Jul-03 16:48 
GeneralRe: Sending non-keyboard chars Pin
Abin27-Jul-03 17:33
Abin27-Jul-03 17:33 
GeneralRe: Sending non-keyboard chars Pin
phlipping27-Jul-03 18:04
phlipping27-Jul-03 18:04 
GeneralRe: Sending non-keyboard chars Pin
Beer2627-Jul-03 18:20
Beer2627-Jul-03 18:20 
GeneralRe: Sending non-keyboard chars Pin
phlipping27-Jul-03 18:32
phlipping27-Jul-03 18:32 
GeneralMDI window title when created Pin
michael_cowan27-Jul-03 13:35
michael_cowan27-Jul-03 13:35 
GeneralRe: MDI window title when created Pin
Beer2627-Jul-03 14:26
Beer2627-Jul-03 14:26 
GeneralWin98 DDK --&gt;XP Pin
Kuniva27-Jul-03 10:48
Kuniva27-Jul-03 10:48 
GeneralRe: Win98 DDK --&gt;XP Pin
J. Dunlap27-Jul-03 10:50
J. Dunlap27-Jul-03 10:50 
GeneralRe: Win98 DDK --&gt;XP Pin
Kuniva27-Jul-03 10:58
Kuniva27-Jul-03 10:58 
GeneralRe: Win98 DDK --&gt;XP Pin
Kuniva27-Jul-03 12:14
Kuniva27-Jul-03 12:14 
GeneralRe: Win98 DDK -->XP Pin
Beer2627-Jul-03 12:16
Beer2627-Jul-03 12:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.