Results 1 to 4 of 4

Thread: C++ Bitblt sample

  1. #1
    Join Date
    May 2008
    Posts
    372

    C++ Bitblt sample

    Hi,

    I'm writing a program, I have too many bitmaps used as the program has become very large and bitmaps can also be difficult to make certain points clear.

    Hence my question: Can you embed PNG images, and if so how? And if you can provide me a sample of Bitblt.

    Somehow, the question was when surfing the net not really clear enough ...

    I am pleased with answers or ideas ...

  2. #2
    Join Date
    May 2008
    Posts
    376

    Re: C++ Bitblt sample

    I think there is there no Lib: http://members.gamedev.net/lode/projects/LodePNG/ would possibly help you. Otherwise simple GDI +

  3. #3
    Join Date
    May 2008
    Posts
    372

    Re: C++ Bitblt sample

    Thanks for the link but if the so complicated is a PNG image process. I think this is nothing for me ... thought that is so similar to bitmaps, known as Visual Studio, and adding resources
    Code:
     hBmp = LoadBitmap (hInstance, TEXT ( "BITMAP NAME")); 
      GetObject (hBmp, sizeof (BITMAP), & Bmp); 
    
      SelectObject (hdcMem, hBmp); 
      BitBlt (hdc, x, y, size x, y size, hdcMem, 0, 0, SRCPAINT);
    spends ... because the code is just very complicated (for me ) And very long, therefore, to ask again ... is there easy way to do it?

  4. #4
    Join Date
    May 2008
    Posts
    376

    Re: C++ Bitblt sample

    Well take it easy because you have just put as a parameter in the following manner:

    Code:
    std:: ifstream file_stream ( "C: \ \ sample.png", std:: ios_base:: binary); 
      if (! file_stream) (std:: cerr << "ERROR: File Not Found!"; return 1;) 
      std:: vector <unsigned char> image (file_stream. seekg (0, std:: ios_base:: end). tellg ()); 
      file_stream. seekg (0, std:: ios_base:: beg). read (& image [0], image. size ()); 
      std:: pair <unsigned long, unsigned long> size; 
      decodePNG (image, size. firstName, size. Second, & image [0], image. size ());
    then you should have the data in just like normal image pixel bitmap that you can use .....

Similar Threads

  1. Sample for Experience Certificate
    By Gowd in forum Education Career and Job Discussions
    Replies: 6
    Last Post: 04-05-2012, 12:35 PM
  2. Error during sample compile
    By Agaev in forum Windows Software
    Replies: 5
    Last Post: 20-07-2010, 10:24 PM
  3. Sample Rate for Cd
    By Mannat in forum Hardware Peripherals
    Replies: 3
    Last Post: 03-09-2009, 01:09 PM
  4. IAS Sample papers
    By Bhave in forum Education Career and Job Discussions
    Replies: 1
    Last Post: 16-03-2009, 01:35 PM
  5. Sample Sites Using Joomla
    By Seraphim in forum Software Development
    Replies: 3
    Last Post: 27-01-2009, 06:35 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,026,232.98814 seconds with 17 queries