Click here to Skip to main content
15,919,778 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: about VC+MySQL problem:) Pin
Christian Graus19-Nov-06 15:21
protectorChristian Graus19-Nov-06 15:21 
Questionarray of functions of two parameters Pin
jquan3278619-Nov-06 4:27
jquan3278619-Nov-06 4:27 
AnswerRe: array of functions of two parameters Pin
Mark Salsbery19-Nov-06 7:13
Mark Salsbery19-Nov-06 7:13 
AnswerRe: array of functions of two parameters Pin
CPallini20-Nov-06 3:48
mveCPallini20-Nov-06 3:48 
QuestionDisplay Waveform of MP3 Pin
quantumdecipher19-Nov-06 2:11
quantumdecipher19-Nov-06 2:11 
Question--------- Pin
Irwin.R19-Nov-06 0:03
Irwin.R19-Nov-06 0:03 
AnswerRe: Setting File Permissions Pin
PJ Arends19-Nov-06 0:26
professionalPJ Arends19-Nov-06 0:26 
QuestionCBitmap(HBITMAP) conversion to raw RBG image. Pin
harripyy_118-Nov-06 23:48
harripyy_118-Nov-06 23:48 
Hello,

I have images(CBitmap or HBITMAP) on TCP server side, which is implemented with Visual C++.

Is the conversion from hBitmap to Array possible? (RBG rawimage) (CreateBitmap converts Array to hBitmap)

I have implemented Java TCP Client Applet, which should display the "CBitmap or HBITMAP" image. (Server sents this image to Java Client, which should display the image.)

If someone can help, then thanks a lot.

Regards,
Harri



//---------------------------------------------
Example 1
//---------------------------------------------
C++ Example of Windows CBitmap(or HBITMAP) format:

#include <windows.h>
....

HBITMAP hBitmap;
BYTE px[] =
{
0x00,0xFF,0x00,0xFF,0x00,0xFF ,
0x00,0xFF,0x00,0xFF,0x00,0xFF ,
0xFF,0x00,0xFF,0x00,0xFF,0x00 ,
0x00,0xFF,0x00,0xFF,0x00,0xFF
};

hBitmap = CreateBitmap(48 , 4 , 1 , 1 , px);

Can the hBitmap be converted to Array again?

//HBITMAP CreateBitmap(int nWidth , int nHeight ,UINT cPlanes,UINT cBitsPerPel,CONST VOID *lpvBits)

//---------------------------------------------
Example 2:
//---------------------------------------------
Java example drawing picture:

import java.awt.*
Image myPic;
myPic= getImage(getCodeBase(), "picture.gif");
g.drawImage(myPic,100,100,this);
AnswerRe: CBitmap(HBITMAP) conversion to raw RBG image. Pin
Waldermort19-Nov-06 0:47
Waldermort19-Nov-06 0:47 
GeneralRe: CBitmap(HBITMAP) conversion to raw RBG image. Pin
harripyy_119-Nov-06 1:47
harripyy_119-Nov-06 1:47 
Questionthe difference of using custom control and picture ? Pin
cyn818-Nov-06 23:10
cyn818-Nov-06 23:10 
AnswerRe: the difference of using custom control and picture ? Pin
Mark Salsbery19-Nov-06 5:58
Mark Salsbery19-Nov-06 5:58 
GeneralRe: the difference of using custom control and picture ? Pin
cyn819-Nov-06 14:12
cyn819-Nov-06 14:12 
GeneralRe: the difference of using custom control and picture ? Pin
Christian Graus19-Nov-06 14:21
protectorChristian Graus19-Nov-06 14:21 
GeneralRe: the difference of using custom control and picture ? Pin
Mark Salsbery19-Nov-06 14:23
Mark Salsbery19-Nov-06 14:23 
GeneralRe: the difference of using custom control and picture ? Pin
cyn819-Nov-06 14:44
cyn819-Nov-06 14:44 
GeneralRe: the difference of using custom control and picture ? Pin
Mark Salsbery20-Nov-06 5:03
Mark Salsbery20-Nov-06 5:03 
QuestionHashing algorithms Pin
Waldermort18-Nov-06 20:51
Waldermort18-Nov-06 20:51 
AnswerRe: Hashing algorithms Pin
PJ Arends18-Nov-06 23:44
professionalPJ Arends18-Nov-06 23:44 
AnswerRe: Hashing algorithms Pin
El Corazon19-Nov-06 5:12
El Corazon19-Nov-06 5:12 
AnswerRe: Hashing algorithms Pin
Jörgen Sigvardsson19-Nov-06 5:36
Jörgen Sigvardsson19-Nov-06 5:36 
AnswerRe: Hashing algorithms Pin
Blake Miller22-Nov-06 3:58
Blake Miller22-Nov-06 3:58 
Questionfgetc/fputc crashes with long filenames [modified] Pin
chichina18-Nov-06 17:33
chichina18-Nov-06 17:33 
AnswerRe: fgetc/fputc crashes with long filenames Pin
PJ Arends18-Nov-06 18:45
professionalPJ Arends18-Nov-06 18:45 
GeneralRe: fgetc/fputc crashes with long filenames Pin
chichina18-Nov-06 18:59
chichina18-Nov-06 18:59 

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.