Eh forgot to say that I'm a beginner, is there a sample of this somewhere, I don't understand how I'm supposed to access this parameter or how a WindowProc() function is supposed to be set up.
I looked into it but I don't see how I'm supposed to tie keyboard stuff into that, also I don't want to have a window appear on the screen, I want this program to run in the background.
I looked into it but I don't see how I'm supposed to tie keyboard stuff into that
It can be done the way I explained. But you need to understand how a Windows API program works before you do that.
also I don't want to have a window appear on the screen, I want this program to run in the background.
You still need a Windows program if you want to interact with the desktop window. You can make the window invisible, but you really need to understand what you're doing. Just randomly looking for code snippets won't get you very far.
EDIT: may I ask why do you need to get keyboard input from the desktop window?
I guess he wants to write a keylogger. To handle global key-presses use GetAsyncKeyState. To hide the window just don't call ShowWindow. Though it would be much simpler if you made this a console application and use GetConsoleWindow and ShowWindow to hide it as soon as the program starts.
Well basically I'm running windows 7 and I don't have any shortcuts on my desktop, so I want to write a little program that automatically puts anything I type (when the desktop is in focus) into the little search box when you open the start menu. I have the focus and menu-opening done, just need the key detection now. Well I kinda wanted to do a quick and dirty program, but if the only way I can do this is with windows then I guess I'll learn them then.
Ok I think I have everything set up right, how do I access the wParam though, is it just message.wParam (for some reason my visual studio isn't doing any syntax highlighting or suggestions or anything : <)?
Hm I guess it's kind of good in a way since it lets me specify what characters I want to "detect", ok I'll try this and get back to you, thanks again : ).
EDIT: Wait WndProc only responds to messages right, so wouldn't I have to create my own thread or something to constantly check for button presses?