Draw image on other bitmap image in pocket pc
-
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
-
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
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. <