simple graphics in c++\winmillenium

This is a discussion on simple graphics in c++\winmillenium within the Windows Programming forums, part of the Platform Specific Boards category; what is the equivalent of the 'putpixel' command in win c++ programs? i'm using bc4.52 thx...

  1. #1
    Registered User
    Join Date
    Jun 2002
    Posts
    3

    simple graphics in c++\winmillenium

    what is the equivalent of the 'putpixel' command in win c++
    programs? i'm using bc4.52
    thx

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    That would have to be the cunningly titled SetPixel() API

    COLORREF SetPixel(
    HDC hdc, // handle to DC
    int X, // x-coordinate of pixel
    int Y, // y-coordinate of pixel
    COLORREF crColor // pixel color
    );
    Use Windows.h

  3. #3
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    In the WIN32 API:
    Code:
    SetPixel(hdc, x, y, crColour);

  4. #4
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    dammit, you posted while I was typing...GRRRR!!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. simple 2d "putpixel" api for windows?
    By spiky in forum C Programming
    Replies: 2
    Last Post: 10-27-2005, 03:44 PM
  2. Graphics tutorial
    By ssjnamek in forum C++ Programming
    Replies: 1
    Last Post: 08-15-2005, 03:13 AM
  3. a simple Dev-C++ game graphics system
    By shintaro in forum Game Programming
    Replies: 1
    Last Post: 08-11-2005, 06:49 PM
  4. Tutorial for making better computer graphics?
    By supertoad in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 05-02-2005, 01:19 AM
  5. Very simple question, problem in my Code.
    By Vber in forum C Programming
    Replies: 7
    Last Post: 11-16-2002, 03:57 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21