Originally posted by: The Boys at Clinitec
The overridden OnInitDialog:
BOOL CSumPropSheet::OnInitDialog()
if(m_pView != NULL)
//Resize Tab and window of propsheet
rcTab.right = rcPlaceHolder.Width();
CRect rcSheet;
return bResult;
I was trying to add a small set of property pages/property Sheet to my View. When adding the property pages
to the view, the right hand side of the page was "clipped". Further investigation revealed that
trying to put a page on a "holder" less than 318 pixels wide resulted in clipping the page window.
The base class was sizing the pages to a minimum required for an AFX_IDC_TAB_CONTROL. The solution was to
overide the OnInitDialog function in the derived PropertySheet Class. The Picture box "holder" is
AFX_IDC_TAB_CONTROL contained in the parent view. A pointer to the parent view is passed into the derived
class constructor.
{
BOOL bResult = CPropertySheet::OnInitDialog();
{
CWnd* pPlaceHolder = m_pView->GetDlgItem(AFX_IDC_TAB_CONTROL);
CRect rcPlaceHolder;
pPlaceHolder->GetWindowRect(rcPlaceHolder);
CWnd* pTabWnd = GetDlgItem(AFX_IDC_TAB_CONTROL);
CRect rcTab;
pTabWnd->GetWindowRect(rcTab);
ScreenToClient(rcTab);
pTabWnd->SetWindowPos(NULL, 0, 0,
rcTab.Width(), rcTab.Height(),
SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
GetWindowRect(rcSheet);
rcSheet.right = rcPlaceHolder.Width();
SetWindowPos(NULL, 0, 0,
rcSheet.Width(), rcSheet.Height(),
SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
}
}
Originally posted by: Maurizio Toppino
I've inserted a property sheet (made of two property pages) inside a Form View.
My problem is that when I resize the Form View I can't appropriately resize the two property pages:
anybody can help me?
Originally posted by: Yasushi Ozawa
Hello.
I suceessfully implemented the property sheet with two property pages in the FormView according to this
topic.
But I have two questiones.
(1) How do I know which page is selected?
(2) I want to update data in the pages when the button attached on the FormView(not on the property
sheet) is pusshed. The data are provided
from a dynaset getting at creating the FormView.
So I have to manage this procedure on the FormView.
I can't understand how to write the data into the pages and read the dat
from the pages.
How is it able for me?
Maybe these are preliminaly, I think. But I don't know how to do.
Please teach me.
Thank you for youe help.
Yasushi Ozawa
Reply
Originally posted by: -=[SKULK]=-
When sizing the Wnd manually the frame flickers, cause you
can only set the color to black or darkgray. Is there any possibility
to paint it in that wonderful background color ?
Originally posted by: Mark Cariddi
Hi,
How can I make my property sheet receive ON_COMMAND_UPDATE_UI requests. The CFormView that it is
embedded in receives them, but I need to get them at my property sheet.
Originally posted by: Simon Birtles
ie |
The only problem I have is trying to get a pointer to the document. I have no problem Using CDocument*
pDoc = GetDocument() form the form view as you would expect, But I cannot get this from the property sheets /
pages. I have tried GetParent and using this pointer to the form view but this causes an access violation, I
have tried this on a simple project but with the same results.
The Access Violation occurs when calling
pDoc->SetModifiedFlag(TRUE);
Any Ideas...?
I have implemented this idea in a three way splitter DLL
|
-------
pDoc->UpdateAllViews(NULL);
Originally posted by: Bernd Haidan
Hay
First, its really a verry good idea the sheet in the form i seek for
there one a longe time.
Second, i have implement it. Additional the Form is in a SplitterWnd.
What i can say. Idosent work ?
Can you post me please a sample?
By Bernd
P.S: Excuse the bad english !
ReplyOriginally posted by: Jennifer Zhang
Anyone has any work around? Please help.
No accelerator key works unless you set focus to a control other than anything on the property sheet.
Originally posted by: Sam
Hello,
This maybe a lame question but I don't know what you mean by the following statement..
Create a handler to WM_INITIALUPDATE in CMyFromView,
Could you clarify and show me how?
Thank you for your help.
Sam
Reply