Click here to Skip to main content
15,892,643 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalwindowsmessage Pin
_tasleem27-Jul-05 13:06
_tasleem27-Jul-05 13:06 
GeneralRe: windowsmessage Pin
John R. Shaw28-Jul-05 5:59
John R. Shaw28-Jul-05 5:59 
Generalextract byte code from string for COM1 Pin
quarry_0627-Jul-05 12:37
quarry_0627-Jul-05 12:37 
GeneralRe: extract byte code from string for COM1 Pin
John R. Shaw28-Jul-05 6:15
John R. Shaw28-Jul-05 6:15 
Question.* and .*? Pin
John R. Shaw27-Jul-05 11:10
John R. Shaw27-Jul-05 11:10 
AnswerRe: .* and .*? Pin
includeh1027-Jul-05 11:55
includeh1027-Jul-05 11:55 
GeneralRe: .* and .*? Pin
John R. Shaw27-Jul-05 12:10
John R. Shaw27-Jul-05 12:10 
GeneralGDI + to save graphics from the screen into a file Pin
flamy27-Jul-05 10:47
flamy27-Jul-05 10:47 
Hi, All.
I'm working on a Win32 project that draws some stuff on a canvas, and I need to add an option that saves whatever drawn on a canvas into a file. I have succeded in creating an empty .png image, however, I'm not seem to be able to save whatever drawings I make on the screen (I'm tryning to use DrawImage method).
for example
-----
for(int i=1; i<=size; i++)
{
dx = elements->x;
dy = elements->y;

if((translateToScreen(dx, true) > (-mcoord.eDx + 3 + offsforax + yaxoffst))&&(translateToScreen(dy, false)>(umin.y*cRatio.y*zoomr.y + offsety * cRatio.y*zoomr.y)))
{
graphics.FillRectangle(&blk, (REAL)translateToScreen(dx, true)+2, (REAL)translateToScreen(dy, false)-5, (REAL)6,(REAL)10);
graphics.FillRectangle(&col, (REAL)translateToScreen(dx, true)+3, (REAL)translateToScreen(dy, false)-4, (REAL)4,(REAL)8);
}

elements++;
}
bm = new Bitmap(current.right - current.left, current.bottom - current.top, &graphics);
gr.DrawImage(bm, current.left, current.top, current.right-current.left, current.bottom-current.top);
}
-------
In this piece of code, I'm trying to draw some points on a screen, as well as in a bitmap object, but this aproach fails. What should I change? Thanks.

Alex.
GeneralRe: GDI + to save graphics from the screen into a file Pin
mark novak27-Jul-05 15:04
mark novak27-Jul-05 15:04 
GeneralRe: GDI + to save graphics from the screen into a file Pin
flamy27-Jul-05 15:21
flamy27-Jul-05 15:21 
General'Web' or 'Tree' Display Pin
bugDanny27-Jul-05 10:43
bugDanny27-Jul-05 10:43 
Generaldialog box trouble Pin
DaveHuber27-Jul-05 10:27
DaveHuber27-Jul-05 10:27 
GeneralRe: dialog box trouble Pin
bugDanny27-Jul-05 10:49
bugDanny27-Jul-05 10:49 
GeneralRe: dialog box trouble Pin
DaveHuber28-Jul-05 4:48
DaveHuber28-Jul-05 4:48 
GeneralDriver programming question Pin
JakeTruman27-Jul-05 9:47
JakeTruman27-Jul-05 9:47 
GeneralRe: Driver programming question Pin
Toby Opferman27-Jul-05 14:37
Toby Opferman27-Jul-05 14:37 
GeneralRe: Driver programming question Pin
JakeTruman3-Aug-05 12:01
JakeTruman3-Aug-05 12:01 
QuestionHow to disable the help in VC6 Pin
JWood27-Jul-05 9:22
JWood27-Jul-05 9:22 
AnswerRe: How to disable the help in VC6 Pin
David Crow27-Jul-05 9:45
David Crow27-Jul-05 9:45 
GeneralRe: How to disable the help in VC6 Pin
JWood28-Jul-05 4:57
JWood28-Jul-05 4:57 
AnswerRe: How to disable the help in VC6 Pin
Blake Miller27-Jul-05 12:08
Blake Miller27-Jul-05 12:08 
Generalproblem with multiple defined symbols Pin
Qvicksilver27-Jul-05 9:07
Qvicksilver27-Jul-05 9:07 
GeneralRe: problem with multiple defined symbols Pin
David Crow27-Jul-05 9:43
David Crow27-Jul-05 9:43 
GeneralRe: problem with multiple defined symbols Pin
Qvicksilver27-Jul-05 10:12
Qvicksilver27-Jul-05 10:12 
GeneralRe: problem with multiple defined symbols Pin
John R. Shaw27-Jul-05 11:32
John R. Shaw27-Jul-05 11:32 

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.