I'm looking for a tutorial to explain handles and messages in C.
I tried searching google for a while with no real success. Maybe I'm using the wrong keywords...
which handles and messages?
can you explain more?
I think that will do.
I haven't read threw them yet but I have a general question.
In C when I call a function I MUST wait till it ends for my program to continue, right?
How do I start off a function to do something but return back to say my "main" function while the function is still in process? Don't need to give much details just the general idea. I will look into details later.
ANSI C is a structured language. Means, you must wait for finishing one thread and then start new one.
But you could write a kernel function for your programs. Your kernel function would manage your other routines like windows OS kernel. For example, your kernel function would check your keyboard, mouse, ports,...... and if it find any activity kernel will return activity type to main routine.
win32 api has two functions depending on your needs. SendMessage() will send a message and not wait for a response, however the called function will not run concurrently with the caller. If you want the two functions to run concurrently then you have to create another thread and run the second function in that thread.