Click here to Skip to main content
15,915,328 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: switch to existing instance Pin
Eytukan4-Mar-09 7:21
Eytukan4-Mar-09 7:21 
AnswerRe: switch to existing instance Pin
negativeG4-Mar-09 7:45
negativeG4-Mar-09 7:45 
AnswerRe: switch to existing instance Pin
led mike4-Mar-09 8:36
led mike4-Mar-09 8:36 
GeneralRe: switch to existing instance Pin
negativeG4-Mar-09 8:51
negativeG4-Mar-09 8:51 
GeneralRe: switch to existing instance Pin
led mike4-Mar-09 9:04
led mike4-Mar-09 9:04 
AnswerRe: switch to existing instance Pin
David Crow4-Mar-09 9:38
David Crow4-Mar-09 9:38 
GeneralRe: switch to existing instance Pin
negativeG5-Mar-09 7:58
negativeG5-Mar-09 7:58 
QuestionClipboard to jpeg using jpeglib Pin
alexhalt4-Mar-09 5:39
alexhalt4-Mar-09 5:39 
Hello!

I'm trying to get picture from clipboard

hClipboardData = GetClipboardData( CF_BITMAP );




and save it as a jpeg image. And I'm having some problems.

I convert the clipboard to DIB like it's here
http://www.codeguru.com/cpp/g-m/bitmap/comments.php/c1765/?thread=23182

The code is like follows

hDib = DDBToDIB( ( HBITMAP )hClipboardData, BI_RGB, NULL );




Then I try to convert DIB to JPEG like here
http://www.codeguru.com/cpp/g-m/bitmap/otherformats/print.php/c1731

But at this line

(void)jpeg_write_scanlines( &cinfo,
                                   jsmpArray,
                                   cinfo.image_height );




I've got the following error
Improper call to jpeg library in state 100

I couldn't find any info about this error.
Please advise
AnswerRe: Clipboard to jpeg using jpeglib Pin
Stuart Dootson4-Mar-09 6:12
professionalStuart Dootson4-Mar-09 6:12 
GeneralRe: Clipboard to jpeg using jpeglib Pin
alexhalt10-Mar-09 1:45
alexhalt10-Mar-09 1:45 
GeneralRe: Clipboard to jpeg using jpeglib Pin
Stuart Dootson10-Mar-09 2:02
professionalStuart Dootson10-Mar-09 2:02 
QuestionPing Using UDP Pin
tiger08064-Mar-09 5:00
tiger08064-Mar-09 5:00 
AnswerRe: Ping Using UDP [modified] Pin
Stuart Dootson4-Mar-09 5:52
professionalStuart Dootson4-Mar-09 5:52 
Question[Message Deleted] Pin
FISH7864-Mar-09 4:38
FISH7864-Mar-09 4:38 
AnswerRe: Powerbuilder to visual c++. Pin
Stuart Dootson4-Mar-09 5:49
professionalStuart Dootson4-Mar-09 5:49 
GeneralRe: Powerbuilder to visual c++. Pin
FISH7864-Mar-09 7:00
FISH7864-Mar-09 7:00 
GeneralRe: Powerbuilder to visual c++. Pin
Stuart Dootson4-Mar-09 7:06
professionalStuart Dootson4-Mar-09 7:06 
GeneralRe: Powerbuilder to visual c++. Pin
FISH7864-Mar-09 10:11
FISH7864-Mar-09 10:11 
QuestionCreating header - CListCtrl Pin
grassrootkit4-Mar-09 3:59
grassrootkit4-Mar-09 3:59 
AnswerRe: Creating header - CListCtrl Pin
Michael Schubert4-Mar-09 5:40
Michael Schubert4-Mar-09 5:40 
QuestionRe: Creating header - CListCtrl Pin
grassrootkit4-Mar-09 6:20
grassrootkit4-Mar-09 6:20 
AnswerRe: Creating header - CListCtrl Pin
Stuart Dootson4-Mar-09 6:25
professionalStuart Dootson4-Mar-09 6:25 
GeneralRe: Creating header - CListCtrl Pin
grassrootkit4-Mar-09 6:31
grassrootkit4-Mar-09 6:31 
GeneralRe: Creating header - CListCtrl Pin
grassrootkit4-Mar-09 6:33
grassrootkit4-Mar-09 6:33 
GeneralRe: Creating header - CListCtrl Pin
grassrootkit4-Mar-09 6:25
grassrootkit4-Mar-09 6:25 

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.