Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Rectangle not displaying and how to display image on a form.

0 views
Skip to first unread message

pooja

unread,
Mar 10, 2004, 12:16:05 AM3/10/04
to
in MFC based dialog application
For drawing a rectangle i have included the code as

CRect rone(10,10,100,100);
CRect rtwo(50,50,200,200);
CRect runion ;
CRect rintersect;
runion.UnionRect(rone,rtwo);
rintersect.IntersectRect(rone,rtwo);
UpdateData(FALSE);

still the rectangle is not being displayed on the form?
what is the mistake ? do we need to include some header file?

and one more thing , in MFC based dialog application if i include the picture from the control box , i have options of frame,icon,bitmap, rectangle and enhanced metafile ,
what to do to include *.jpeg image?

thanx

Joseph M. Newcomer

unread,
Mar 10, 2004, 8:36:17 PM3/10/04
to
And what, exactly, is the purpose of UpdateData? I don't see any variables associated with
controls here that UpdateData would do anything with.

Also, I don't see anything that would draw the rectangle.

You usually have to deal with the JPEG image on your own. I'd suggest using a bitmap,
because you're going to have to convert the JPEG to a bitmap to display it (or use GDI+,
which apparently has native support for JPEG files.
joe

Joseph M. Newcomer [MVP]
email: newc...@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm

0 new messages