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

C / C++ / MFC

 
GeneralRe: Getting coordinates between two points(CPoint) Pin
1-Jun-01 9:46
suss1-Jun-01 9:46 
GeneralRe: Getting coordinates between two points(CPoint) Pin
1-Jun-01 18:38
suss1-Jun-01 18:38 
GeneralMFC & Thread Pin
Muslim1-Jun-01 6:49
Muslim1-Jun-01 6:49 
GeneralRe: MFC & Thread Pin
1-Jun-01 13:23
suss1-Jun-01 13:23 
GeneralGetting a blank document by clicking OnNewDocument Pin
mr20031-Jun-01 6:45
mr20031-Jun-01 6:45 
GeneralRe: Getting a blank document by clicking OnNewDocument Pin
2-Jun-01 5:11
suss2-Jun-01 5:11 
GeneralLoad CBitmap with LoadBitmap(); Pin
Paul Goodyear1-Jun-01 6:12
Paul Goodyear1-Jun-01 6:12 
Question"Printing" to a bitmap? - How? Pin
Jim Howard1-Jun-01 6:10
Jim Howard1-Jun-01 6:10 
Programming would be a good way to make a living if it were not for these pesky users.

I work on an application that draws some graphs of data obtained from test instruments. The graphing is done by our own MFC based graph class. It draws onto a CDC object in response to a windows draw message in the normal MFC way. We can render our graphs on the screen or the printer with no problems. There's a lot of code in the class, but it's very standard MFC drawing, nothing unusual.

Just when I thought I was safe to take off early on Friday, management comes up with this: "Hey Jim, our big important customers love our graphs, but they want to be able to save them as jpegs so they can embed them in their word processing documents. Can you hack something up? They are visiting next week and we'd like a demo."

Great.

I have one little problem with this request. I have no idea how to even start!

I'm sure that saving it as a regular uncompressed bitmap would be fine, I have a graphics class that lets me display, save, and print bitmaps in both jpeg and windows bitmap formats.

But how do I get the bitmap in the first place? Is there anyway to have a "bitmap device context"? I'm trying to think, but nothing is happening. I know there are programs that do this, so it must be possible.

Your suggestions and pointers are very welcome.







Confused | :confused: Mad | :mad: Dead | X|

Jim
AnswerRe: Pin
Tomasz Sowinski1-Jun-01 7:54
Tomasz Sowinski1-Jun-01 7:54 
Generaluse a C function from a C++ program Pin
hearties1-Jun-01 5:55
hearties1-Jun-01 5:55 
GeneralRe: use a C function from a C++ program Pin
Stephen Kellett1-Jun-01 6:24
Stephen Kellett1-Jun-01 6:24 
GeneralRe: use a C function from a C++ program Pin
Jim Howard1-Jun-01 6:28
Jim Howard1-Jun-01 6:28 
GeneralCatching ESCape key in a CDialog window Pin
1-Jun-01 4:58
suss1-Jun-01 4:58 
GeneralRe: Catching ESCape key in a CDialog window Pin
Tim Deveaux1-Jun-01 5:38
Tim Deveaux1-Jun-01 5:38 
GeneralCComboBox problem Pin
David Burrows1-Jun-01 4:55
David Burrows1-Jun-01 4:55 
GeneralRe: CComboBox problem Pin
Tomasz Sowinski1-Jun-01 7:42
Tomasz Sowinski1-Jun-01 7:42 
GeneralPlease help : problem with distributing ActifveX control Pin
Bartek1-Jun-01 4:55
Bartek1-Jun-01 4:55 
General#pramga startup equivilent Pin
Steve Thresher1-Jun-01 4:41
Steve Thresher1-Jun-01 4:41 
GeneralRe: #pramga startup equivilent Pin
Tim Deveaux1-Jun-01 5:30
Tim Deveaux1-Jun-01 5:30 
GeneralRe: #pramga startup equivilent Pin
Tomasz Sowinski1-Jun-01 7:36
Tomasz Sowinski1-Jun-01 7:36 
GeneralRe: #pramga startup equivilent Pin
Steve Thresher2-Jun-01 1:39
Steve Thresher2-Jun-01 1:39 
Generallinking error: library conflict Pin
hearties1-Jun-01 3:29
hearties1-Jun-01 3:29 
GeneralRe: linking error: library conflict Pin
Dave Carkeet1-Jun-01 4:32
Dave Carkeet1-Jun-01 4:32 
GeneralMsComm example ... Pin
Hadi Rezaee1-Jun-01 1:09
Hadi Rezaee1-Jun-01 1:09 
GeneralLinker error 2005 Pin
1-Jun-01 0:56
suss1-Jun-01 0:56 

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.