Solved

generic c++ +< windows.h>

Posted on 2007-11-28
8
218 Views
Last Modified: 2010-04-01
http://www.codeproject.com/system/keyboard.asp

is it possible to make this function available to generic c++ without having to use visual studio?
0
Comment
Question by:Troudeloup
  • 4
  • 3
8 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 200 total points
ID: 20368962
Well, you will need windows.h for the declaration of 'keybd_event()' and all the constants used there. Apart from that, it should work with any compiler.
0
 

Author Comment

by:Troudeloup
ID: 20368997
method wise - the sample code cannot be used directly. right?

can you venture on a guess on how he accomplish this?

send ("hellow world!")


in a string and then automatically looked up codes for each symbol -


no wait, he could do string1[n]  and then replace each with codes he looks up!


" " = vk_space, or something


right?
0
 
LVL 40

Assisted Solution

by:evilrix
evilrix earned 300 total points
ID: 20369020
Unfortunately, in C++ there is no generic and cross platform (by this I mean the OS, not the compiler!) way to do such keyboard scanning as it is not defined by the standard. Each platform will provide it's own way to achieve this.
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:Troudeloup
ID: 20369090
oh i should empasize that I want to use  kbevent  on windows with windows sdk!


i want to avoid visual studio for now.
0
 
LVL 40

Assisted Solution

by:evilrix
evilrix earned 300 total points
ID: 20369119
>> i want to avoid visual studio for now.
I have this strange feeling of deja vu :)

I don't know why you don't just prototype it using VS first and then; once you are more comfortable with what you are doing look to migrate to another compiler. I'm sure it'd be a lot less painful for you :)
0
 

Author Comment

by:Troudeloup
ID: 20369149
actually i have menu, children window, windows help, and terminology phobia and it's really bad.

i find dealing with only c++ code in text compiler with color coding a little less steep on the curve.

:D
0
 
LVL 40

Assisted Solution

by:evilrix
evilrix earned 300 total points
ID: 20369178
You are a strange one Troudeloup, but a source of much amusement :)
0
 
LVL 40

Expert Comment

by:evilrix
ID: 20369212
:)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Building cUrl in Windows v7.43.0 4 36
C Language combined operators 28 114
c++ syntax question 9 52
Using Diagnostic tools in VS2015: Unresoved allocations 19 104
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question