Thread: Paint Program Example Source Code??

  1. #1
    Registered User Welder's Avatar
    Join Date
    Oct 2007
    Location
    Washington
    Posts
    100

    Paint Program Example Source Code??

    Does anybody have any source code for a simple paint program that can load/save bitmap (or maybe even gif) format? I found some examples using MFC but I don't want to use MFC or anything like that, just the standard Win32 API and Bloodshed Dev C++.

    Preferrably in C, but C++ would be OK.

    I looked all over the net for one but can't find anything except big programs like GIMP which are way to complicated for me to learn from.

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    Look at GDI+ for images.

    LoadImage() will load a bitmap from file or out of your resources (.rc file)

    Try a search here for 'screen capture' for code to capture and save a bitmap.

    All my code is in MFC, as it is easy to use, safe and has a very short development time compared to WIN32.
    Give WIN32 a few years and you will understand why I use MFC.....
    Last edited by novacain; 11-05-2007 at 08:16 PM.
    "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

  3. #3
    Registered User Welder's Avatar
    Join Date
    Oct 2007
    Location
    Washington
    Posts
    100
    I would use MFC but I have no idea how. Every MFC project I download from the internet will not compile on Bloodshed Dev C++.

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I have a feeling that MFC isn't supported by Bloodshed - but I don't know for sure. It is delivered as part of the Microsoft Visual Studio C++ compiler set.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    MFC is only supported by Microsoft products.
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  6. #6
    Registered User Welder's Avatar
    Join Date
    Oct 2007
    Location
    Washington
    Posts
    100
    That's what I thought.

  7. #7
    Registered User Welder's Avatar
    Join Date
    Oct 2007
    Location
    Washington
    Posts
    100
    So how can I download MFC for VC 2005 Express?

  8. #8

  9. #9
    Registered User Welder's Avatar
    Join Date
    Oct 2007
    Location
    Washington
    Posts
    100
    I have the PSDK but every MFC project don't compile.

  10. #10
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    What errors are you getting?

    According to a moderator on MSDN's forums

    "You need to by Visual Studio 2005 Standard at least, or you need a MSDN abo! ATL and MFC are not available for free download!
    The SDK contains a 64bit version of ATL+MFC. This always causes confusion!
    And because of VC-Express doesn't support 64bit its worthless for you!

    There is no Win32 MFC/ATL version for public/free access! "
    Last edited by novacain; 11-08-2007 at 06:35 PM.
    "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. Client-server system with input from separate program
    By robot-ic in forum Networking/Device Communication
    Replies: 3
    Last Post: 01-16-2009, 03:30 PM
  2. Source Code now available
    By Ash1981 in forum C Programming
    Replies: 0
    Last Post: 02-01-2006, 07:52 AM
  3. large program code ,please help
    By Ash1981 in forum C Programming
    Replies: 14
    Last Post: 01-30-2006, 06:16 AM
  4. Search for patterns in source code
    By MiamiCuse in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 10-23-2005, 11:28 PM
  5. fopen();
    By GanglyLamb in forum C Programming
    Replies: 8
    Last Post: 11-03-2002, 12:39 PM