Click here to Skip to main content
15,898,982 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionSaving Bitmap image data to HGLOBAL [modified] Pin
alleyes19-Jan-10 9:40
professionalalleyes19-Jan-10 9:40 
GeneralRe: Saving Bitmap image data to HGLOBAL [modified] Pin
Andreoli Carlo19-Jan-10 21:00
professionalAndreoli Carlo19-Jan-10 21:00 
QuestionRe: Saving Bitmap image data to HGLOBAL Pin
alleyes20-Jan-10 1:38
professionalalleyes20-Jan-10 1:38 
AnswerRe: Saving Bitmap image data to HGLOBAL Pin
Andreoli Carlo20-Jan-10 3:17
professionalAndreoli Carlo20-Jan-10 3:17 
GeneralRe: Saving Bitmap image data to HGLOBAL Pin
alleyes20-Jan-10 3:52
professionalalleyes20-Jan-10 3:52 
GeneralRe: Saving Bitmap image data to HGLOBAL Pin
alleyes20-Jan-10 5:27
professionalalleyes20-Jan-10 5:27 
AnswerRe: Saving Bitmap image data to HGLOBAL Pin
Mark Salsbery20-Jan-10 7:01
Mark Salsbery20-Jan-10 7:01 
GeneralRe: Saving Bitmap image data to HGLOBAL Pin
alleyes20-Jan-10 7:08
professionalalleyes20-Jan-10 7:08 
Let me clarify what I said and thanks for correcting that

Yes you are correct. I was just pointing out that the Images were using the managed version classes. What I hope to accomplish is:

I have one HGLOBAL. This is used to create an image of type System::Drawing::Bitmap.

HGLOBAL hdl = GloabalAlloc(BitmapImageSize);

PBITMMAPINFOHEADER bmih = (PBITMAPINFOHEADER)GlobalLock(hdl);

LPDWORD ImgBits = (LPDWORD)(bmih + sizeof(BITMAPINFOHEADER));
....
....
....

StretchDIBits()......

That gives me an image from an HGLOBAL

If I had an image already in memory, from some other means (loaded from file maybe), I want to then point that image to the HGLOBAL.

The reason for using those deprecated function is the type that is returned from functions in ActiveX controls that handle image acquisition is of HGLOBAL. It is then convenient to use those Global functions and since I am doing a mixed mode app thanks in large part to using C++/CLI I can do this.
GeneralRe: Saving Bitmap image data to HGLOBAL Pin
Mark Salsbery20-Jan-10 7:18
Mark Salsbery20-Jan-10 7:18 
GeneralRe: Saving Bitmap image data to HGLOBAL Pin
alleyes20-Jan-10 7:29
professionalalleyes20-Jan-10 7:29 
GeneralRe: Saving Bitmap image data to HGLOBAL Pin
Mark Salsbery20-Jan-10 7:36
Mark Salsbery20-Jan-10 7:36 
GeneralRe: Saving Bitmap image data to HGLOBAL Pin
alleyes20-Jan-10 7:48
professionalalleyes20-Jan-10 7:48 
GeneralRe: Saving Bitmap image data to HGLOBAL Pin
Mark Salsbery20-Jan-10 8:03
Mark Salsbery20-Jan-10 8:03 
GeneralRe: Saving Bitmap image data to HGLOBAL [modified] Pin
alleyes20-Jan-10 8:34
professionalalleyes20-Jan-10 8:34 
GeneralRe: Saving Bitmap image data to HGLOBAL Pin
alleyes20-Jan-10 9:17
professionalalleyes20-Jan-10 9:17 
GeneralRe: Saving Bitmap image data to HGLOBAL Pin
Mark Salsbery20-Jan-10 9:42
Mark Salsbery20-Jan-10 9:42 
GeneralRe: Saving Bitmap image data to HGLOBAL Pin
alleyes20-Jan-10 9:58
professionalalleyes20-Jan-10 9:58 
GeneralRe: Saving Bitmap image data to HGLOBAL Pin
Mark Salsbery20-Jan-10 10:07
Mark Salsbery20-Jan-10 10:07 
GeneralRe: Saving Bitmap image data to HGLOBAL Pin
alleyes20-Jan-10 10:09
professionalalleyes20-Jan-10 10:09 
GeneralRe: Saving Bitmap image data to HGLOBAL Pin
Mark Salsbery20-Jan-10 10:20
Mark Salsbery20-Jan-10 10:20 
GeneralRe: Saving Bitmap image data to HGLOBAL Pin
alleyes20-Jan-10 10:31
professionalalleyes20-Jan-10 10:31 
GeneralRe: Saving Bitmap image data to HGLOBAL Pin
alleyes20-Jan-10 10:45
professionalalleyes20-Jan-10 10:45 
GeneralRe: Saving Bitmap image data to HGLOBAL Pin
Mark Salsbery20-Jan-10 11:33
Mark Salsbery20-Jan-10 11:33 
GeneralRe: Saving Bitmap image data to HGLOBAL [modified] Pin
alleyes21-Jan-10 2:15
professionalalleyes21-Jan-10 2:15 
GeneralRe: Saving Bitmap image data to HGLOBAL Pin
Mark Salsbery21-Jan-10 5:19
Mark Salsbery21-Jan-10 5:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.