| matthew95 (24) | |||
So yes:
I was able to improve CallNextHookEx but I do not know whether I But it is still one error | |||
|
|
|||
| Ogoyant (153) | |||||
|
I'll tell you again: Your code here:
is not a part of any function. Your referenced code has this as part of WinMain():
Your code does not belong to any defined function, you just write it after everything else. See my post here, in your other thread: http://cplusplus.com/forum/windows/89955/#msg483585 | |||||
|
Last edited on
|
|||||
| matthew95 (24) | |
|
Could I ask you to tell me you wrote the code running because I do not have the strength I do not know how to convert it so that it works. I understand now that it is outside the main () but I do not know what to do. After showing through you for sure I will not do such errors. | |
|
|
|
| Ogoyant (153) | |||
I suggest you read: http://cplusplus.com/doc/tutorial/ It will clear out a lot of C++ features for you. | |||
|
Last edited on
|
|||
| matthew95 (24) | |||
But this example is that was it, that I will add something like that but then I get errors about the declaration:
Do not get me wrong, but he wants to do the same thing does not want to copy someone's code. Is that what you meant that it is the function? | |||
|
|
|||
| Ogoyant (153) | |
|
I understand that you want to do the same thing without copying the code, I am referring you to your referenced code because some features cannot be changed for it to work. For example, case 'VK_A': won't work for two reasons for you: 1), you have not defined VK_A like your reference code does: #define VK_A 65 and 2) In this situation you have to use switch like this: case VK_A:rather than case 'VK_A':These are requirements of using this type of notions such as a constant value (VK_A representing 65), and using "switch" -- and since you want to use those features, you have to do what is required for them to work -- so if you want to do the same thing in your code, the parts that you change make your code not work. That's why I said that it's a good idea to read the tutorials of this site, to familiarize yourself with the concepts of C++ a little better and understand why changes like the ones I mention above generate the errors you have been getting in the first place. No, your int ok() is not what I meant. "return CallNextHookEx()" should be part of LowLevelKeyboardProc() (see my previous posts). Also, there are other problems. I suggest you check out the tutorials and familiarize yourself more with concepts of C++, the problems will then be apparent to you. | |
|
Last edited on
|
|
| matthew95 (24) | |||
|
Thanks for the help but for now I'll give up on it I will not get tired of it. Now I have another question for you, I found this code:
Can you tell me what function here is responsible for the push buttons? and why not write capital letters ? | |||
|
|
|||