Click here to Skip to main content
15,916,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to insert one CFormView into a Dialog Based MFC Application as a control?

I want to display a bitmap in real size in the Dialog and could be scrolled~~So I want to place the bitmap in the CFormView,but i dont konw how to add the CFormView to the dialog~~

Thanks~~
Posted

I believe what you really need is a scrollable child dialog.
Take a look at this - How to implement a scrollable child dialog[^]
 
Share this answer
 
Comments
Keanu L 17-Jan-12 22:53pm    
I just want to insert a square scrollable view in the center of the dialog~~but not the scrollable child dialog~~~
Thanks~~
That's not very simple since CDialogs weren't made to host a view control (you're supposed to make an SDI or MDI application for that functionality), but others have done it.

Here's an article (I'm sure you can find more by searching):
Inserting a Doc/Frame/View in a dialog using a custom control[^]

...There was also one on how to convert a dialog application to SDI, but I can't seem to find it...
 
Share this answer
 
Comments
Keanu L 17-Jan-12 22:58pm    
In fact,what i want to do is to insert a fixed sized picture control into the dialog,but the picture control is scrollable to display the real image by using the scrollbar.
en,i cant fing the way,so i insert a picture control in to the CFormView(scrollable),and then insert the view to the dialog.This my thought~~

Thanks~~
Albert Holguin 17-Jan-12 23:15pm    
What are you trying to say? Your comment doesn't add anything different.
Keanu L 18-Jan-12 9:27am    
ha~~
 
Share this answer
 
Comments
Keanu L 17-Jan-12 22:59pm    
..............

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900