Thread: moving objects in a window

  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    205

    moving objects in a window

    Hi,
    I am currently starting to desig a program that will move an object (most probably an image of a a circle) around an area with grid lines of equal length using data from a file. Accessing a file is no problem. The graphical part is a little hard right now. I am familiar with MFC and visual studio .net 2003. I was wondering if anybody had any suggestion of how to go about doing that and what functions might be useful. Thanks a lot,
    Amish

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    look at 'double buffering', plenty of code here.

    GDI / GDI+ watch for GDI leaks (lost GDI objects when using SlectObject() )

    GetDC()
    CreateCompatibleDC()
    CreateCompatibleBitmap()
    SelectObject()
    LineTo()
    CreatePen(), CreateBrush() ect
    FrameRect()
    Elipse()
    DeleteDC()
    ReleaseDC()
    DeleteObject()

    BitBlit()
    GetUpdateRect()
    ............
    "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. C or C++
    By AcerN30 in forum Game Programming
    Replies: 41
    Last Post: 05-30-2008, 06:57 PM
  2. Just starting Windows Programming, School me!
    By Shamino in forum Windows Programming
    Replies: 17
    Last Post: 02-22-2008, 08:14 AM
  3. Replies: 4
    Last Post: 01-16-2006, 05:58 PM
  4. How to force window redraw when moving... ?
    By jekko in forum Windows Programming
    Replies: 2
    Last Post: 02-28-2004, 02:45 AM
  5. Invoking MSWord
    By Donn in forum C Programming
    Replies: 21
    Last Post: 09-08-2001, 04:08 PM