Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - Interop.Imaging.CReateBitmapSourceFromHBitmap example

 
 
Old 01-10-2006   #1 (permalink)
bonk


 
 

Interop.Imaging.CReateBitmapSourceFromHBitmap example

is there any example around about how to use the static function
System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap ?

I especially have a hard time with he first two parameters. How do I
convert from MFC CBitmap/CPalette to IntPtr.

My System SpecsSystem Spec
Old 01-10-2006   #2 (permalink)
robertwl@nospam.microsoft.com


 
 

re: Interop.Imaging.CReateBitmapSourceFromHBitmap example

Hi Bonk,

The first parameter is a pointer to an HBITMAP.
The second parameter is a pointer to an HPALETTE. Pass in null if it is not a palettized image.

I'm not familiar with MFC's CBitmap and CPalette. Is there a way to get an HBITMAP and HPALETTE from those?

Robert.

-----Original Message-----
From: bonk
Posted At: Thursday, January 05, 2006 2:46 AM
Posted To: microsoft.public.windows.developer.winfx.avalon
Conversation: Interop.Imaging.CReateBitmapSourceFromHBitmap example
Subject: Interop.Imaging.CReateBitmapSourceFromHBitmap example


is there any example around about how to use the static function
System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap ?

I especially have a hard time with he first two parameters. How do I
convert from MFC CBitmap/CPalette to IntPtr.
My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Interop .NET General
Microsoft.VirtualServer.Interop.dll and the Microsoft.VMRCClientControl.Interop.dll Virtual Server
Using an interop assembly with interop dependencies PowerShell
Microsoft Launches Icons of Imaging Program at First Microsoft Pro Photo Summit, Recognizing Present and Future Leaders in Photography and Digital Imaging Vista News


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46