problem with dialog in a view
Dear gurus,
In one of my application, I am using a UI which has a tree view on left side and a simple view on right side. The user right-clicks on the treeview and can open a dialog for himself from a right-click pop-up menu. now this dialog is a modeless a i have done pDlg->SetParent(this), for the view which is on the right-side of the application. the problem comes when the diaolg which is shown on right-side of application (Somehtng like Resource Editor Insert Dialog), I am not able to put a scroll bar in the view, so that if the dialog that is shown in this view is larger in size than view then the user can scrooll it.
i want that if my dialog is bigger than the view, then scrolling option is given to the user?
how can i do it?
Regards,
Nitin
[794 byte] By [
qcnitin] at [2007-11-18 20:33:20]

# 1 Re: problem with dialog in a view
What do you mean by "View"? Is it your dialog or tree view or something else. If the dailog (that you show after right clicking), then set that dialog's property (from dialog resource editor) to have a scroll bar). If tree control needs to have scroll, it is not a problem! Finally, if your "unknown view" need to have scrollbar, explain it.
# 2 Re: problem with dialog in a view
well Ajay,
sorry if could not make it understood..well, in Resourece Editor, When you insert a dialog that dialog appears on the right side of the view, (CView, CScrollView, or something). now, when we resize the dialog, and if it becomes bigger than the view in which it is contained, then scroll bar appears for the view. so by scroliing we can see part of the dialog. this is what i want to do.
i hope i have been clearer this time..
nitin
# 5 Re: problem with dialog in a view
dear gurus,
this is what i am doing in my right-side view class (CScrollView)
pDlg = new CTestDlg(this);
pDlg->Create(IDD_DIALOG1, this);
pDlg->SetParent (this);
CRect rect(0,0,0,0);
pDlg->GetWindowRect (&rect);
ScreenToClient(&rect);
pDlg->MoveWindow(0,0, rect.Width (), rect.Height ());
pDlg->ShowWindow (SW_SHOW);
now, this IDD_DIALOG1 may be larger in size than the view contains. So i want, if it is larger than the view, then scroll bar appear for the view class..
this i am unable to do.
Please help.
Nitin