Click here to Skip to main content
15,885,216 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Modbus Protocol Pin
Richard MacCutchan9-Sep-13 21:03
mveRichard MacCutchan9-Sep-13 21:03 
AnswerRe: Modbus Protocol Pin
CPallini9-Sep-13 22:15
mveCPallini9-Sep-13 22:15 
Questionis c++ outdated, why is there no refference to it in windows virtual academy ? Pin
A.U.K9-Sep-13 0:03
professionalA.U.K9-Sep-13 0:03 
AnswerRe: is c++ outdated, why is there no refference to it in windows virtual academy ? Pin
NotPolitcallyCorrect9-Sep-13 1:47
NotPolitcallyCorrect9-Sep-13 1:47 
QuestionUsing CDHtmlDialog app, changing images (JPG,PNG) dynamically in the HTML Page Pin
Don Guy6-Sep-13 12:37
Don Guy6-Sep-13 12:37 
AnswerRe: Using CDHtmlDialog app, changing images (JPG,PNG) dynamically in the HTML Page Pin
Richard MacCutchan7-Sep-13 1:39
mveRichard MacCutchan7-Sep-13 1:39 
AnswerRe: Using CDHtmlDialog app, changing images (JPG,PNG) dynamically in the HTML Page Pin
Richard Andrew x647-Sep-13 11:29
professionalRichard Andrew x647-Sep-13 11:29 
GeneralRe: Using CDHtmlDialog app, changing images (JPG,PNG) dynamically in the HTML Page Pin
Don Guy8-Sep-13 9:31
Don Guy8-Sep-13 9:31 
To make the question much more simpler Smile | :)

1. Can i pass the Image file (JPG, PNG) as a memory buffer like "unsigned char *" from my MFC app to the HTML page and then use some JavaScript function to understand that it's a Image file and display on the HTML page. It can be done either by passing the JPG to the "src" of Image or drawing it on a CANVAS. But all JS/HTML should have is a memory buffer of Image file.

So the 1st question is,

1. How to read a Image file as memory buffer (unsigned char *) in MFC? i.e, making sure it doesn't loose any NULL terminators or any binary contents.

And 2nd question is,

1. How to pass this memory buffer to the JavaScript function in the HTML page?

And 3rd question is,

1. How can the JavaScript function decrypt this memory buffer into a Image file and display in the HTML page?

The reason why i want to do it this way is because the HTML should never be able to display the Image file from a file path or URL. That is a requirement for the project i am doing.

HTML page should only use a memory buffer containing the Image file info. Hope this information helps.

Thanks in advance. I appreciate the 2 earlier responses i got.
GeneralRe: Using CDHtmlDialog app, changing images (JPG,PNG) dynamically in the HTML Page Pin
Richard Andrew x648-Sep-13 14:12
professionalRichard Andrew x648-Sep-13 14:12 
AnswerRe: Using CDHtmlDialog app, changing images (JPG,PNG) dynamically in the HTML Page Pin
SoMad8-Sep-13 15:38
professionalSoMad8-Sep-13 15:38 
QuestionReading Image (JPG) file as Binary to CString Pin
Don Guy6-Sep-13 6:03
Don Guy6-Sep-13 6:03 
AnswerRe: Reading Image (JPG) file as Binary to CString Pin
jeron16-Sep-13 6:09
jeron16-Sep-13 6:09 
QuestionRe: Reading Image (JPG) file as Binary to CString Pin
David Crow6-Sep-13 6:12
David Crow6-Sep-13 6:12 
AnswerRe: Reading Image (JPG) file as Binary to CString Pin
Richard MacCutchan6-Sep-13 6:35
mveRichard MacCutchan6-Sep-13 6:35 
GeneralRe: Reading Image (JPG) file as Binary to CString Pin
Don Guy6-Sep-13 6:44
Don Guy6-Sep-13 6:44 
GeneralRe: Reading Image (JPG) file as Binary to CString Pin
Jochen Arndt6-Sep-13 7:05
professionalJochen Arndt6-Sep-13 7:05 
QuestionRe: Reading Image (JPG) file as Binary to CString Pin
David Crow6-Sep-13 17:23
David Crow6-Sep-13 17:23 
GeneralRe: Reading Image (JPG) file as Binary to CString Pin
Richard MacCutchan6-Sep-13 22:44
mveRichard MacCutchan6-Sep-13 22:44 
Questionffmpeg images to video using C++ Pin
CodingHell6-Sep-13 1:13
CodingHell6-Sep-13 1:13 
Question1-Can I reverse drawtext function? 2-How to know the length of data in your app Pin
JoneLe865-Sep-13 21:46
JoneLe865-Sep-13 21:46 
AnswerRe: 1-Can I reverse drawtext function? 2-How to know the length of data in your app Pin
Richard MacCutchan5-Sep-13 22:09
mveRichard MacCutchan5-Sep-13 22:09 
GeneralRe: 1-Can I reverse drawtext function? 2-How to know the length of data in your app Pin
JoneLe865-Sep-13 22:14
JoneLe865-Sep-13 22:14 
GeneralRe: 1-Can I reverse drawtext function? 2-How to know the length of data in your app Pin
Richard MacCutchan5-Sep-13 22:29
mveRichard MacCutchan5-Sep-13 22:29 
QuestionHow to get text of special symbol font? Pin
yangdp15-Sep-13 18:07
yangdp15-Sep-13 18:07 
AnswerRe: How to get text of special symbol font? Pin
JoneLe865-Sep-13 21:51
JoneLe865-Sep-13 21:51 

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.