Solved

CPictureHolder

Posted on 1998-11-23
2
525 Views
Last Modified: 2013-11-20
How to get a .BMP file into CPictureHolder, please? Or since I do know how to get a .BMP file into DIB, tell me how to get from DIB to CPictureHolder at least. Thanks.
0
Comment
Question by:stehlik
2 Comments
 
LVL 2

Accepted Solution

by:
jstolan earned 100 total points
Comment Utility
CPictureHolder::CreateFromBitmap

Or is that too easy?  It's not hard to go from a bmp file into a CBitmap, and that's widely published in Microsoft's help documentation.
0
 

Author Comment

by:stehlik
Comment Utility
I put a wrong question, sorry. In reality it's like this: I take .BMP, convert it to DIB, then to CLongBinary and store it in a database. The question is how to convert CLongBinary (a pointer to DIB data retrieved from database) into CPictureHolder. This is what I need to know.
But DIB and .BMP should be very close (if not the same), so I would probably need just help with the CreateFromBitmap. The truth is I haven't managed to get it working. HBITMAP is not the same as pointer to my DIB, most probably. It either crashed or didn't create the bitmap (there was just nothing).

There are probably different DIB formats as well - I do use the format that is somehow compatible with LeadTools 8.0's SetDIB() method for displaying picture in LeadTools control.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now