Thread: Couple Code Snippets

  1. #1

    Couple Code Snippets

    Alright I have a couple of code snippets I want to know what exactly they do I mean what everything means not just what it is doing.

    bActive = !((BOOL)HIWORD(wParam));

    Alright I know it is typecasting HIWORD into a boolean variable but what is HIWORD(wParam) if I remember isn't wParam split into two 16 bit integers. So would HIWORD be taking the first of the two integers?

    Thanks anyone who helps

  2. #2
    train spotter
    Join Date
    Aug 2001
    near a computer
    wparam and lparam are additional info passed in a Windows program with a message.

    case	WM_SIZE:
    this is a size msg recieved in the callback and then the x,y coods are extracted so the window can be redrawn at the correct size.

    In yours it looks like a flag is checked to the see if it is not equal to current.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Updated sound engine code
    By VirtualAce in forum Game Programming
    Replies: 8
    Last Post: 11-18-2004, 12:38 PM
  2. Binary Search Trees Part III
    By Prelude in forum A Brief History of
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  3. Math function code - couple probs, tips?
    By Captain Penguin in forum C++ Programming
    Replies: 4
    Last Post: 06-18-2002, 09:54 AM
  4. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM
  5. Replies: 4
    Last Post: 01-16-2002, 12:04 AM