Thread: Help with this code

  1. #1

    Help with this code

    { // copy doublebuffer to window
    HDC hdc = GetDC(hMainWnd);

    ok what does this code snippet it do I know what it does within the braket flips the back buffer but um why is it in the brackets by itself

    it goes
    the stuff up there in here

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    It's probably in its own block because the coder wanted hdc to be a local variable to that area, the possibility is also there that one of the lines caused problems while in scope with the rest of the function and a block was thrown around the piece of code to isolate it and fix the problem.

    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Extended ASCII Characters in an RTF Control
    By JustMax in forum C Programming
    Replies: 18
    Last Post: 04-03-2009, 08:20 PM
  2. Enforcing Machine Code Restrictions?
    By SMurf in forum Tech Board
    Replies: 21
    Last Post: 03-30-2009, 07:34 AM
  3. Obfuscated Code Contest
    By Stack Overflow in forum Contests Board
    Replies: 51
    Last Post: 01-21-2005, 04:17 PM
  4. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM
  5. Replies: 0
    Last Post: 02-21-2002, 06:05 PM