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

Managed C++/CLI

 
GeneralRe: Saving Bitmap image data to HGLOBAL Pin
Mark Salsbery20-Jan-10 7:40
Mark Salsbery20-Jan-10 7:40 
GeneralRe: Saving Bitmap image data to HGLOBAL Pin
alleyes20-Jan-10 7:51
professionalalleyes20-Jan-10 7:51 
QuestionFade TabPage between TabControl's tab selection Pin
roshihans15-Jan-10 19:02
roshihans15-Jan-10 19:02 
QuestionI need an ebay program Pin
totolcm13-Jan-10 2:22
totolcm13-Jan-10 2:22 
QuestionCreating image file from pointer to HGLOBAL Pin
alleyes10-Jan-10 12:28
professionalalleyes10-Jan-10 12:28 
AnswerRe: Creating image file from pointer to HGLOBAL Pin
Mark Salsbery12-Jan-10 9:59
Mark Salsbery12-Jan-10 9:59 
GeneralRe: Creating image file from pointer to HGLOBAL Pin
alleyes12-Jan-10 10:25
professionalalleyes12-Jan-10 10:25 
GeneralRe: Creating image file from pointer to HGLOBAL [modified] Pin
Mark Salsbery12-Jan-10 10:34
Mark Salsbery12-Jan-10 10:34 
alleyes wrote:
I saw that the array size was goofy so I fixed that - I think.

array^ imgArray = gcnew array<BYTE>(imgHeader->biSizeImage + sizeof(BITMAPFILEHEADER));


Still not big enough Smile | :)

array<BYTE>^ imgArray = gcnew array<BYTE>(imgHeader->biSizeImage + sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER));



alleyes wrote:
Marshal::Copy(static_cast<IntPtr>(Pixels), imgArray, sizeof(BITMAPFILEHEADER), imgHeader->biSizeImage);


You're not writing the BITMAPINFOHEADER to the output array...
I missed that one the first time, sorry Smile | :)

Marshal::Copy(static_cast<IntPtr>(imgHeader), imgArray, sizeof(BITMAPFILEHEADER), sizeof(BITMAPINFOHEADER) + imgHeader->biSizeImage);

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

modified on Tuesday, January 12, 2010 4:47 PM

GeneralRe: Creating image file from pointer to HGLOBAL Pin
alleyes12-Jan-10 10:52
professionalalleyes12-Jan-10 10:52 
GeneralRe: Creating image file from pointer to HGLOBAL Pin
alleyes20-Jan-10 3:02
professionalalleyes20-Jan-10 3:02 
GeneralRe: Creating image file from pointer to HGLOBAL Pin
Mouzam Basheer23-May-16 20:40
Mouzam Basheer23-May-16 20:40 
QuestionGetting screen width and height Pin
m_mun7-Jan-10 4:12
m_mun7-Jan-10 4:12 
AnswerRe: Getting screen width and height Pin
Luc Pattyn7-Jan-10 4:19
sitebuilderLuc Pattyn7-Jan-10 4:19 
AnswerRe: Getting screen width and height Pin
Andreoli Carlo17-Jan-10 22:41
professionalAndreoli Carlo17-Jan-10 22:41 
QuestionSystem::String ^ to LPCWSTR conversion? Pin
Mattzimmerer6-Jan-10 22:27
Mattzimmerer6-Jan-10 22:27 
AnswerRe: System::String ^ to LPCWSTR conversion? Pin
Richard MacCutchan7-Jan-10 0:25
mveRichard MacCutchan7-Jan-10 0:25 
GeneralRe: System::String ^ to LPCWSTR conversion? Pin
Mattzimmerer7-Jan-10 9:14
Mattzimmerer7-Jan-10 9:14 
GeneralRe: System::String ^ to LPCWSTR conversion? Pin
Richard MacCutchan7-Jan-10 9:54
mveRichard MacCutchan7-Jan-10 9:54 
AnswerRe: System::String ^ to LPCWSTR conversion? [modified] Pin
Mark Salsbery7-Jan-10 9:35
Mark Salsbery7-Jan-10 9:35 
QuestionRe: System::String ^ to LPCWSTR conversion? Pin
Mattzimmerer7-Jan-10 9:59
Mattzimmerer7-Jan-10 9:59 
AnswerRe: System::String ^ to LPCWSTR conversion? Pin
Mark Salsbery7-Jan-10 12:56
Mark Salsbery7-Jan-10 12:56 
GeneralRe: System::String ^ to LPCWSTR conversion? Pin
Mattzimmerer7-Jan-10 22:01
Mattzimmerer7-Jan-10 22:01 
QuestionHow to Get DataTable column name ?? [modified] Pin
ajaxswan6-Jan-10 18:18
ajaxswan6-Jan-10 18:18 
AnswerRe: How to Get DataTable column name ?? Pin
Andreoli Carlo19-Jan-10 2:30
professionalAndreoli Carlo19-Jan-10 2:30 
Questionhow to declare array of object [modified] Pin
m_mun6-Jan-10 1:02
m_mun6-Jan-10 1:02 

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.