Click here to Skip to main content
16,006,749 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Add dialog to Cview Pin
LiYS17-Oct-05 17:12
LiYS17-Oct-05 17:12 
GeneralRe: Add dialog to Cview Pin
Christian Graus17-Oct-05 17:45
protectorChristian Graus17-Oct-05 17:45 
GeneralRe: Add dialog to Cview Pin
LiYS17-Oct-05 17:52
LiYS17-Oct-05 17:52 
GeneralRe: Add dialog to Cview Pin
Christian Graus17-Oct-05 18:05
protectorChristian Graus17-Oct-05 18:05 
GeneralRe: Add dialog to Cview Pin
Christian Graus17-Oct-05 18:15
protectorChristian Graus17-Oct-05 18:15 
Questionthe color of view Pin
yuduntang17-Oct-05 16:27
yuduntang17-Oct-05 16:27 
AnswerRe: the color of view Pin
John M. Drescher17-Oct-05 16:32
John M. Drescher17-Oct-05 16:32 
Questionhow to convert Byte[] to image? Pin
GoodQuestion17-Oct-05 14:21
GoodQuestion17-Oct-05 14:21 
I know how to do that in visual c++ NET. But I cant use Filestream bec I am using visual C++ 6.0. I know. I know. it is so old but I have no choice. so how can I convert byte array to image(or binary) that will insert data to sql database.


HBITMAP hBitmap = (HBITMAP) ::LoadImage(AfxGetInstanceHandle(), strPath, IMAGE_BITMAP, 100,140,LR_LOADFROMFILE | LR_CREATEDIBSECTION);

CBitmap mybmp;
mybmp.Attach((HBITMAP)hBitmap);

BITMAP sBM;
mybmp.GetBitmap(&sBM);
//add new pics
BYTE* pbOldBitmapBits = new BYTE[sBM.bmWidthBytes*sBM.bmHeight];
mybmp.GetBitmapBits(sBM.bmWidthBytes*sBM.bmHeight, (LPVOID)pbOldBitmapBits);

m_Picture.SetBitmap((HBITMAP)mybmp);

char c[10];
itoa(sBM.bmWidthBytes,c,10);
CString strTemp = c;
BSTR bstrWidth = strTemp.AllocSysString();
strTemp.Empty();
itoa(sBM.bmHeight,c,10);
strTemp = c;
BSTR bstrHeight = strTemp.AllocSysString();

spIPlasmaConsumables->AddConsumablePictures(m_spIUnkConnection,"TEST1",pbOldBitmapBits,bstrHeight,bstrWidth);//add new image at sql database


pbOldBitmapBits(bytes) convert to image(binary)
Remember I cant use C++ .NET at all
use Visual c++ 6.0 only

AnswerRe: how to convert Byte[] to image? Pin
Christian Graus17-Oct-05 15:04
protectorChristian Graus17-Oct-05 15:04 
QuestionNeeded a thesis report Pin
sheshidar17-Oct-05 9:50
sheshidar17-Oct-05 9:50 
QuestionRe: Needed a thesis report Pin
David Crow17-Oct-05 10:06
David Crow17-Oct-05 10:06 
AnswerRe: Needed a thesis report Pin
Christian Graus17-Oct-05 12:17
protectorChristian Graus17-Oct-05 12:17 
GeneralRe: Needed a thesis report Pin
Trollslayer17-Oct-05 13:22
mentorTrollslayer17-Oct-05 13:22 
GeneralRe: Needed a thesis report Pin
Maximilien17-Oct-05 15:31
Maximilien17-Oct-05 15:31 
AnswerRe: Needed a thesis report Pin
Prakash Nadar17-Oct-05 16:57
Prakash Nadar17-Oct-05 16:57 
GeneralRe: Needed a thesis report Pin
ThatsAlok17-Oct-05 18:28
ThatsAlok17-Oct-05 18:28 
QuestionConvert from CObject to inherited class Pin
bugDanny17-Oct-05 8:47
bugDanny17-Oct-05 8:47 
AnswerRe: Convert from CObject to inherited class Pin
PJ Arends17-Oct-05 15:40
professionalPJ Arends17-Oct-05 15:40 
GeneralRe: Convert from CObject to inherited class Pin
bugDanny18-Oct-05 5:49
bugDanny18-Oct-05 5:49 
GeneralRe: Convert from CObject to inherited class Pin
PJ Arends18-Oct-05 6:28
professionalPJ Arends18-Oct-05 6:28 
AnswerRe: Convert from CObject to inherited class Pin
John M. Drescher17-Oct-05 16:29
John M. Drescher17-Oct-05 16:29 
GeneralRe: Convert from CObject to inherited class Pin
ThatsAlok17-Oct-05 18:30
ThatsAlok17-Oct-05 18:30 
GeneralRe: Convert from CObject to inherited class Pin
John M. Drescher18-Oct-05 11:01
John M. Drescher18-Oct-05 11:01 
AnswerRe: Convert from CObject to inherited class Pin
Rajesh match17-Oct-05 19:16
Rajesh match17-Oct-05 19:16 
GeneralRe: Convert from CObject to inherited class Pin
bugDanny18-Oct-05 5:47
bugDanny18-Oct-05 5:47 

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.