-
April 13th, 2012, 03:02 AM
#1
CDialogEx with a scrollable canvas/panel/formview
Hello,
I have a CDialogEx in my dll which is displayed correctly. This CDialogEx does have a group box. Now I need to display a dynamic amount of edit boxes and labels in a panel/canvas or whatever within this groupbox. The size of this canvas can be larger than the groupbox, so I would need a vertical scroll bar. How can I do this in MFC? I know in C# this is pretty straight forward...but I can't find any controls which would help me out in C++ MFC.
My first thought was creating a IDD_FORMVIEW derived from CDialogEx, create and load it within my Dialog with the size of the group box rect...but then I have no scrolling functionality. The second guess was to use a CFormView derived class, but that I can not instantiate and load in my dialog...so I stuck now :-(
-
April 23rd, 2012, 12:51 PM
#2
Re: CDialogEx with a scrollable canvas/panel/formview
You may find this post helpful. See attachement.
However this is fairly old project created using VS 6.0.
You will have to make sure that child view has following styles set:
Extended WS_EX_CONTROLPARENT. This will prevent dialog from looping endlessly trying to find last control and will render dialog unresposive to user input.
DS_CONTROL See MSDN
There are only 10 types of people in the world:
Those who understand binary and those who do not.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|