PC Review


Reply
Thread Tools Rate Thread

CreateDIBSection from GDI32?

 
 
gregory_may
Guest
Posts: n/a
 
      18th Aug 2005
I cant seem to find good GDI32 function prototype for CreateDIBSection.

Anyone know where I can find them?

This is the best I can find:
http://www.microsoft.com/japan/windo...ave_saveas.asp

But, the BITMAPINFO_STRUCT is missing.



Also, an example of working with CreateDIBSection and BitBlt would be a nice
bonus if anyone has one.


 
Reply With Quote
 
 
 
 
Ken Tucker [MVP]
Guest
Posts: n/a
 
      19th Aug 2005
Hi,

http://pinvoke.net/default.aspx/gdi32.CreateDIBSection

http://pinvoke.net/default.aspx/gdi32.BitBlt

http://pinvoke.net/default.aspx/gdip...tmapFromGdiDib

Ken
------------------------
"gregory_may" <None> wrote in message
news:%(E-Mail Removed)...
>I cant seem to find good GDI32 function prototype for CreateDIBSection.
>
> Anyone know where I can find them?
>
> This is the best I can find:
> http://www.microsoft.com/japan/windo...ave_saveas.asp
>
> But, the BITMAPINFO_STRUCT is missing.
>
>
>
> Also, an example of working with CreateDIBSection and BitBlt would be a
> nice bonus if anyone has one.
>



 
Reply With Quote
 
gregory_may
Guest
Posts: n/a
 
      19th Aug 2005
where do i find the correct definition for:
BITMAPINFO


"Ken Tucker [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> http://pinvoke.net/default.aspx/gdi32.CreateDIBSection
>
> http://pinvoke.net/default.aspx/gdi32.BitBlt
>
> http://pinvoke.net/default.aspx/gdip...tmapFromGdiDib
>
> Ken
> ------------------------
> "gregory_may" <None> wrote in message
> news:%(E-Mail Removed)...
>>I cant seem to find good GDI32 function prototype for CreateDIBSection.
>>
>> Anyone know where I can find them?
>>
>> This is the best I can find:
>> http://www.microsoft.com/japan/windo...ave_saveas.asp
>>
>> But, the BITMAPINFO_STRUCT is missing.
>>
>>
>>
>> Also, an example of working with CreateDIBSection and BitBlt would be a
>> nice bonus if anyone has one.
>>

>
>



 
Reply With Quote
 
Cor Ligthert [MVP]
Guest
Posts: n/a
 
      19th Aug 2005
Gregory,

> where do i find the correct definition for:
> BITMAPINFO
>

A nice newsgroup to ask this is

microsoft.public.dotnet.framework.drawing

I hope you find your answer soon

Cor


 
Reply With Quote
 
Dragon
Guest
Posts: n/a
 
      19th Aug 2005
Hello,

> where do i find the correct definition for:
> BITMAPINFO


Try this:

~
<StructLayout(LayoutKind.Sequential)> Friend Structure BitmapInfo
Public bmiHeader As BitmapInfoHeader
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=1)> Public
bmiColors() As RGBQuad
End Structure

<StructLayout(LayoutKind.Sequential)> Friend Structure
BitmapInfoHeader
Public biSize As Integer
Public biWidth As Integer
Public biHeight As Integer
Public biPlanes As Short
Public biBitCount As Short
Public biCompression As Integer
Public biSizeImage As Integer
Public biXPelsPerMeter As Integer
Public biYPelsPerMeter As Integer
Public biClrUsed As Integer
Public biClrImportant As Integer
End Structure

<StructLayout(LayoutKind.Sequential)> Friend Structure RGBQuad
Public rgbBlue As Byte
Public rgbGreen As Byte
Public rgbRed As Byte
Public rgbReserved As Byte
End Structure
~

I hope it helps

Roman



 
Reply With Quote
 
gregory_may
Guest
Posts: n/a
 
      20th Aug 2005
Thanks!!!


"Dragon" <(E-Mail Removed)> wrote in message
news:%23q%(E-Mail Removed)...
> Hello,
>
>> where do i find the correct definition for:
>> BITMAPINFO

>
> Try this:
>
> ~
> <StructLayout(LayoutKind.Sequential)> Friend Structure BitmapInfo
> Public bmiHeader As BitmapInfoHeader
> <MarshalAs(UnmanagedType.ByValArray, SizeConst:=1)> Public
> bmiColors() As RGBQuad
> End Structure
>
> <StructLayout(LayoutKind.Sequential)> Friend Structure
> BitmapInfoHeader
> Public biSize As Integer
> Public biWidth As Integer
> Public biHeight As Integer
> Public biPlanes As Short
> Public biBitCount As Short
> Public biCompression As Integer
> Public biSizeImage As Integer
> Public biXPelsPerMeter As Integer
> Public biYPelsPerMeter As Integer
> Public biClrUsed As Integer
> Public biClrImportant As Integer
> End Structure
>
> <StructLayout(LayoutKind.Sequential)> Friend Structure RGBQuad
> Public rgbBlue As Byte
> Public rgbGreen As Byte
> Public rgbRed As Byte
> Public rgbReserved As Byte
> End Structure
> ~
>
> I hope it helps
>
> Roman
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error in GDI32.dll Jon Lie Windows XP Help 1 23rd Mar 2007 05:23 PM
gdi32.dll on Windows XP Esha Windows XP Setup 2 7th Dec 2006 11:37 PM
GDI32.DLL Linda Windows XP Basics 3 24th May 2006 04:26 AM
GDI32.dll Linda Windows XP Help 0 21st May 2006 08:56 PM
gdi32.dll eba kero Microsoft Windows 2000 Multimedia 0 17th Sep 2003 09:49 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:42 AM.