Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I am new at programming and was wondering if you could give me some advice as to how to make a alphanumeric character press do something using C? I would like to program a different function for each character pressed. Can anyone help me?
In your window procedure, you can react to WM_KEYDOWN messages. Your window will receive such a message when the user starts pressing down a key. When the user lets go of the key, you will receive a WM_KEYUP message.
See this tutorial on window messages for the basics on how to handle window messages.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 days ago.
Improve this question
I need to check the response coderesponse_code I get from a device with the checksum method. In the description of the response codedesc_of_response, it says control characters are included, but control characters are not in the format that I can checksum. I'm not experienced in this, I'm just starting to learn. I would be very grateful if someone could help me.
How should I do the checksum process? Do I have to take the whole message into account when doing it? How should I deal with non-hexadecimal characters?
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 months ago.
Improve this question
Im trying to filter some type of data into 3, full history, sent, and received. Im using a useState hook, already using the set, but dont know where to use the first variable. And its printing me all the transactions.
im doing a statement verifying if the transaction inside the array is none(history, received(credit), or sent(debit, and placing that into an empty array.
And here im trying to use the variable and the hook with a component that i created.
idk if i have to put something different in the 'data' prop.
Thanks in advance :)
flatlist type should be TransactionDirection
<FlatList<TransactionDirection>>
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I've been searching online but all the top results on Google only lead me to Java. This is frustrating.
What I want to do is: make a program that listens to keyboard events, without being the active program. It has to work on at least windows 7, using C.
For example lets say I have myprogram.exe and other.exe. I want to be able to run both of them simultaneously, and have focus on other.exe, then press keys, and have myprogram.exe which runs on the side display which keys I pressed and log them.
If somebody has a link to a guide or information that explains what I should use to make this, that would be grand. If you can write up an explanation yourself that would be even better, but I don't mind going through documentations as long as they're relevant.
I've written games in C that listen to input from the active window, but I'm not sure how to poll events when the window isn't focused.
If you want to detect 'key press' events occurred in other processes, you should implement Global Hook. You can define a callback function for keyboard input events using SetWindowsHookEx().
Note that the callback function must be in a DLL in order to make it Global Hook.
So your myprogram.exe should link a dll implementing the hook. Then myprogram.exe would be able to detect any keyboard events on Windows.
Following is a good example with an explanation.
http://www.codeproject.com/Articles/1264/KeyBoard-Hooks
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want to know which algorithm is used by the following Applications or WebSite for String Pattern Matching, I have already search by title but nothing found, i want to learn and understand the real time implementation of String Pattern Matching algorithm used by various Applications.
1.Notepad
2.Adobe Reader
3.Web Browsers
4.URL locator
5.StackOverFlow WebSite
Thanks in advance......
For instance a single string matching is the z-algorithm. It's the fastest matcher.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am trying to create a C program which will create a wordsearch and then give the user a time to complete it in and then the program will output a message accordingly. My problem is that I cannot figure out how to ask the user for input while counting down. Any help is appreciated.
Make the user input method it's own thread, a child of the main thread. Use wait in the main thread and then end the child thread when the wait is over. Let us know if you have questions on how to create threads or how to use mutex to keep data secure.