Archived

This topic is now archived and is closed to further replies.

Keeping a picture control inside a frame

This topic is 5502 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey again, I have a frame on my dialog and a picture control inside of it. When I set an image in the picture control, it gets bigger than the frame that is supposed to contain it. How can I make the picture control confine itself to the size of the frame? No MFC please Thanks, Maega

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
make sure the SS_REALSIZEIMAGE style is set for the picture control window, if you don''t want the control to resize at all.

the only way i know of to handle runtime sizing constraints of a control is to subclass the control window using setwindowlong to set up your own wndproc for msg processing, and then to handle the WM_GETMINMAXINFO msg and set ptMaxSize in the MINMAXINFO struct accordingly.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
or handle WM_WINDOWPOSCHANGING to do the same thing, if WM_GETMINMAXINFO is not sent to the picture control window.

Share this post


Link to post
Share on other sites