Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Draw image on other bitmap image in pocket pc

Draw image on other bitmap image in pocket pc

Scheduled Pinned Locked Moved C / C++ / MFC
c++comgraphicsdocker
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Khatri Mitesh
    wrote on last edited by
    #1

    Hi I m working on Pocket PC application using C++ (Win 32). and i want to load multiple image on other single bitmap image (treated as a container of images) . and the new images are the child of the single bitmap image. and these images must be treated as a single bitmap image. i m trying to do this using offScreenBuffer , CreateCompatibleBitmap of Win 32 C++. Please suggest how i do this. Thanx Mitesh

    ~Khatri Mitesh khatrimitesh@hotmail.com Bikaner (Rajasthan) INDIA

    C 1 Reply Last reply
    0
    • K Khatri Mitesh

      Hi I m working on Pocket PC application using C++ (Win 32). and i want to load multiple image on other single bitmap image (treated as a container of images) . and the new images are the child of the single bitmap image. and these images must be treated as a single bitmap image. i m trying to do this using offScreenBuffer , CreateCompatibleBitmap of Win 32 C++. Please suggest how i do this. Thanx Mitesh

      ~Khatri Mitesh khatrimitesh@hotmail.com Bikaner (Rajasthan) INDIA

      C Offline
      C Offline
      Code o mat
      wrote on last edited by
      #2

      Well, i haven't written any progs for PocketPC but as far as i know this mainly works the same way as it does on the desktop platform, so what you should do is to create 2 memory DCs, select your target bitmap (the one you want to put the others on) in the first one and then the other bitmaps you want to put on the first one one by one into the second one and use BitBlt. So something like:

      HDC TargetDC, SourceDC;
      TargetDC = CreateCompatibleDC(NULL);
      SourceDC = CreateCompatibleDC(NULL);
      HBITMAP OriginalTargetBitmap = SelectObject(TargetDC, TargetBitmap);
      ...
      //Put this into a loop that walks thorough all the bitmaps
      HBITMAP OriginalSourceBitmap = SelectObject(SourceDC, CurrentSourceBitmap);
      BitBlt(TargetDC, X, Y, CurrBmpWidth, CurrBmpHeight, SourceDC, 0, 0, SRCCOPY);
      SelectObject(SourceDC, OriginalSourceBitmap);
      ...
      SelectObject(TargetDC, OriginalTargetBitmap);
      DeleteDC(SourceDC);
      DeleteDC(TargetDC);

      > The problem with computers is that they do what you tell them to do and not what you want them to do. <

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups