|
-
Feb 28th, 2001, 03:15 PM
#1
Thread Starter
Frenzied Member
Take a look at this piece:
Code:
TranslateMessage(&msg);
Why is there an ampersand(&) in front of msg????
-
Feb 28th, 2001, 03:28 PM
#2
Monday Morning Lunatic
& is like AddressOf in VB.
Translate message takes a pointer to MSG, so it needs the memory location, a bit like ByRef, because it needs to alter it. So, you pass a pointer by getting it's address using &.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Feb 28th, 2001, 04:25 PM
#3
Thread Starter
Frenzied Member
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|