Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

Interop.Imaging.CReateBitmapSourceFromHBitmap example

Closed Thread
 
Thread Tools Display Modes
Old 01-10-2006   #1 (permalink)
bonk
Guest


 

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.
Old 01-10-2006   #2 (permalink)
robertwl@nospam.microsoft.com
Guest


 

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.
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using an interop assembly with interop dependencies Jeff PowerShell 8 10-11-2007 02:04 AM
Why can't I use Interop assembly instead of COM? Joe.Zapert@gmail.com PowerShell 4 05-30-2007 02:07 PM
Microsoft Launches Icons of Imaging Program at First Microsoft Pro Photo Summit, Recognizing Present and Future Leaders in Photography and Digital Imaging z3r010 Vista News 0 06-29-2006 08:03 AM
MFC interop: getting a CDC* rendered in WPF bonk Avalon 0 01-10-2006 03:53 PM








Vistax64.com 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 2005-2008

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 47 48 49 50