Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » How can I change the right pane when the CExtPageNavigatorWnd item was clicked. Collapse All
Subject Author Date
Ou Shanhu Sep 25, 2007 - 6:28 AM

Dear Support:
Firstly, I would like to express my hones appreciation for the great work that you have done with this library!
Now, I have created an application, and tried to implement a personal software by using the CExt PageNavigatorWnd, my requirement is to create a splittered window, the left pane is the PageNavigator (created according to the example) and the right panes can be changed while clicking the corresponding left items.
The concrete requirement can be descripted by the following figure and my source code had been attached in my e-mail, would you kindly guide me to fix this problem?

Thank you very much.


| Left Caption | Right Caption |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
|-------------------------| |
| Item 1 | |
|-------------------------| |
| Item 2 | |
|-------------------------| |
| Item 3 | |
|-------------------------| |
| Item 4 | |

Technical Support Sep 29, 2007 - 11:17 AM

Please keep mind one important thing. When the CFormView::OnInitialUpdate() method is called, the size of the form view is already changed. I.e. it is not equal to the original size of the loaded dialog template resource. So, if you try to anchor your controls in the OnInitialUpdate() method, some unexpected results will follow.

We recommend you set up anchors when the frame window, which contains form view, is created:

int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
    if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
        return -1;
    // create a view to occupy the client area of the frame
    m_pWndView = new CChildFormView;
    if (!m_pWndView->Create(
            CRect(0, 0, 0, 0), 
        TRACE0("Failed to create view window\n");
        return -1;
    if( !m_wndMenuBar.Create(
        TRACE0("Failed to create menubar\n");
        return -1;      // failed to create
    m_pWndView->AddAnchor( IDC_YOUR_CONTROL, __RDA_LT, __RDA_RT );
. . .

Ou Shanhu Sep 29, 2007 - 5:42 AM

Would you kindly help me finish this requirement based on my program which was mailed to you several day ago?
Thanks a lot.

Ou Shanhu Sep 28, 2007 - 5:18 PM

The right pane is based on CFormView, when i add the anchor code in the OnInitialUpdate function, the result is very strange, sometimes the controls in the formview will be disappear.

Appendix: the following is my code.

void CSecurityView::OnInitialUpdate()


    AddAnchor(IDC_STATIC_CUR_PSW, __RDA_LT, __RDA_RT);
    AddAnchor(IDC_EDIT_CUR_PSW, __RDA_LT, __RDA_RT);
    AddAnchor(IDC_STATIC_NEW_PSW, __RDA_LT, __RDA_RT);
    AddAnchor(IDC_EDIT_NEW_PSW, __RDA_LT, __RDA_RT);
    AddAnchor(IDC_EDIT_NEW_PSW_CFM, __RDA_LT, __RDA_RT);
    AddAnchor(IDC_STATIC_HINTS, __RDA_LT, __RDA_RT);


Technical Support Sep 28, 2007 - 12:45 PM

Please read this article for details:

How to create a window containing auto-resizable controls

Ou Shanhu Sep 28, 2007 - 5:13 AM

How about my question 2?

Technical Support Sep 27, 2007 - 2:35 PM

We sent you an email with a link to the library.

Ou Shanhu Sep 27, 2007 - 7:16 AM

Just Visual Studio 6.0, but I can update to SP6 easily.

Technical Support Sep 26, 2007 - 10:46 AM

Please tell us which SP (if any) is installed for your Visual Studio 6.0?

Ou Shanhu Sep 26, 2007 - 10:28 AM

Thanks a lot for your kindly help, I have received your excellent code.But now I have two problems:
(1) How can I download the latest ProfUIS281md.lib, my program is just for my own interest and what I use is the ProfUIS evaluation version.
(2) If I want to make the dialog controls in the right form view resizable, how I realize this requirement?

Technical Support Sep 25, 2007 - 11:18 AM

We significantly changed your project and implemented an absolutely different, a more appropriate architecture for this type of applications. You may have to use some merge utility to see what the changes we made. Please note we have just fixed a serious bug with form views inside the tab page container control, so you need to update Prof-UIS. You can download the latest version from our FTP if you have a subscription.

Please note we sent you two zip files by emails (3mb and 579kb) yesterday. If you have not received that email, please let us know so we can provide you with these files in some other way.