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...


Re: Handle and Message tutorial 80 80

which handles and messages?
can you explain more?

Re: Handle and Message tutorial 80 80

If you mean Windows, then you are best searching for C Windows API to find links like this one:


Re: Handle and Message tutorial 80 80

Here is another popular tutorial

Re: Handle and Message tutorial 80 80

Thanks guys.
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.

Re: Handle and Message tutorial 80 80

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.

Re: Handle and Message tutorial 80 80

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.