I’d use CreateCompatibleBitmap
, and then call SetDIBits
to fill it with your data. These are functions I have seen to work, and SetDIBits is quite flexible, although verbose.
In my MFC years, CreateBitmap
was avoided due to suspected performance issues.
More Related Contents:
- how to convert wchar_t* type variable to wchar_t[ ] type array? [closed]
- Image to ASCII art conversion
- Convert CString to const char*
- LPCSTR, LPCTSTR and LPTSTR
- StdAfx + Header file – Order of inclusion in MFC application
- Creating a transparent window in C++ Win32
- How to get screenshot of a window as bitmap object in C++?
- How would I load a PNG image using Win32/GDI (no GDI+ if possible)?
- WaitForInputIdle doesn’t work for starting mspaint programmatically
- How do you convert CString and std::string std::wstring to each other?
- Reduce flicker with GDI+ and C++
- Disallowing creation of the temporary objects
- App does not run with VS 2008 SP1 DLLs, previous version works with RTM versions
- SetPixel is too slow. Is there a faster way to draw to bitmap?
- Why stdfax.h should be the first include on MFC applications? [duplicate]
- Drawing a Long String on to a Bitmap results in Drawing Issues
- Difference between a C++ exception and Structured Exception
- Dynamic menu using mfc
- How to Run Only One Instance of Application
- How can we vertically align text in edit box?
- Windows Media Foundation recording audio
- Using includes with c++ shared libraries
- Why is my program slow when looping over exactly 8192 elements?
- how to provide a swap function for my class?
- What happened to the “aggregate or union type that includes one of the aforementioned types” strict aliasing rule?
- How to find the size of an int[]? [duplicate]
- How to check if a template parameter is an iterator type or not?
- Exact decimal datatype for C++?
- Safety of casting between pointers of two identical classes?
- Throwing C++ exceptions across DLL boundaries