Link to home
Start Free TrialLog in
Avatar of jsano19
jsano19

asked on

Graphics in a dialog based MFC application

I am very new to visual c++ and am having a very difficult time finding out how to add graphics to say a picture box in a dialog based application.  Right now, I would be happy with being able to click a button and have rectangles and circles appear in a picture box I create.  Please help!
ASKER CERTIFIED SOLUTION
Avatar of AlexFM
AlexFM

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jsano19
jsano19

ASKER

I tried to do your steps, but run into some problems....
Mainly, adding the member variable of type CStatic in the MFC Class Wizard won't work properly because the picture box I made does not show up as a possible member variable.  do you know why this is?
Avatar of jsano19

ASKER

Ignore that last comment of mine, I figured that out, just me being stupid.  But, in regards to step 2, the OnPaint message isn't in CMyStatic, I'm trying to figure out how to get it there now, but so far without luck.
Avatar of jsano19

ASKER

Ignore that last comment of mine, I figured that out, just me being stupid.  But, in regards to step 2, the OnPaint message isn't in CMyStatic, I'm trying to figure out how to get it there now, but so far without luck.
Avatar of jsano19

ASKER

Sorry, I was just being stupid again.  Thanks for your help though, I did get it to work.  Quick question however, does it have to be a bitmap, or can I use frame and things like that instead?
Nice to see that you solved your problems at the time I was off-line. This should be static control with SS_BITMAP style, exactly as you did (picture control in dialog editor).