wParam

Why do you return wParam in a windows program? What does it specify?
I think this a question that would have aed sense if you had read around a bit more first. Do you need every question answered immediately? Maybe keep a note of things to work out later and live with not knowing for a while.

And while the answer didn't turn up when I googled "Why do you return wParam in a windows program?", you have prob. already read that a Win32 app's message pump runs until GetMessage returns 0, which is when it processes WM_QUIT.

Googling for "WM_QUIT message" you get the information that wParam is "The exit code given in the PostQuitMessage function."

If you didn't know about this function, you could have googled for "PostQuitMessage function"...

Basically, a Win32 app calls PostQuitMessage when it want to quit. By returning the WPARAM in the WM_QUIT message, you are returning this exit code (which you provided when you called PostQuitMessage) from your WinMain function, which can be used to indicate why you exited (e.g. normally, because an error occurred, etc).

If another Win32 app is interested, they can call GetExitCodeProcess to see what this is (google "GetExitCodeProcess function" for more information.)

Andy
Last edited on
I do know about it.

Well thanks.
why'd you ask then?
Again, Google is out there man.

As Andy pointed out, keep a note of these things to work out later.

Do some independent research as well, you depend on Forums too much. There are Great Libraries & Online Archives & Books:

- MSDN Forums. Many of your Answers have already been asked there
- MSDN libraries
- Stack Overflow
- Local Libraries

These are few places to do research before creating a useless thread, about a simple question which is a search away.

Nevertheless, at least you are trying your level best to learn.

GL
Last edited on
Topic archived. No new replies allowed.