Professional UI Solutions
Site Map   /  Register
 
 

Forum

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 » Re: Can't see Dialog controls Collapse All
Subject Author Date
David Ian Jul 20, 2007 - 3:49 AM

Hi All

Can anyone help I am going insane.

I am very new to Prof-UIS, and I have just been given the task of evaluating Ver. 223 and Ver. 270. I have been tearing my hair out because I cannot understand why when I create a dialog and add controls to it such as a TreeCtrl, EditCTrl and a button, a cannot see them. I have written my own application and used the SDIDOCVIEW sample. In the SDIDOCVIEW sample if I add the same controls to the resizable bar dialog I can see the controls when I launch application. Even in the SDIDOCVIEW sample, if I create my own dialog and add the same controls to it and use the same code to create my own floating control bar I still can’t see the controls on my dialog.

Here is a small snippet of the source code:

In the MainFrm.h file I have:-

CExtControlBar        m_wndTESTBarDlg;
#if 1
CExtResizableDialog m_wndTESTResizableDialog;
#else
    CExtWRB<CExtResizableDialog> m_wndTESTResizableDialog;
#endif

In the MainFrm.cpp file I have:-


    if(!m_wndTESTBarDlg.Create(
            _T("Test Dialog bar caption"),
            this,
            ID_VIEW_DIALOG_TEST
            )
        )
    {
        TRACE0("Failed to create m_wndResizableBarDlg\n");
        return -1;        // fail to create
    }

    if( !m_wndTESTResizableDialog.Create(
            IDD_DIALOG_TEST,
            &m_wndTESTBarDlg
            )
        )
    {
        TRACE0("Failed to create m_wndResizableBarDlg\n");
        return -1;        // fail to create
    }

    m_wndTESTBarDlg.EnableDocking( CBRS_ALIGN_ANY );

To me there does n’t seem to be anything wrong with what I am doing, but I just can’t seem to see the controls, or may be the dialog itself is not being displayed.

Can anyone please help.

Thanks in advance.

Dave

Technical Support Jul 21, 2007 - 11:58 AM

Please make sure that your dialog resource has the Visible property set to true.



Suhai Gyorgy Jul 20, 2007 - 5:58 AM

You should check if the style of your dialog is WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN, as in SDIDOCVIEW sample.
I’m not sure if this is the problem, there’s not enough information in your post to conclude anything else, but WS_CLIPCHILDREN is important.

David Ian Jul 20, 2007 - 6:47 AM

Hi Suhai

Thanks for replying to my question so quickly. I think the best way to explain the problem I am having is like this. I am trying to place a dialog (CExtRisizableDialog) on a Control Bar (CExtControlBar) and make it dockable. In the application that I am developing I have a tree control that is embedded into a dialog that has to be dockable so I will have to eventaully subclass the tree control and derive a class from CExtResizableDialog etc. But obviously I didn’t get it to work. But I we forget about my app for now.

I am evaluating the Prof_UIS Freeware vers 223 and 270. I am using the SDIDOCVIEW as a starting point. In this application there is a Dialog with an edit control and a static control that say’s "Resizable dialog view". I added a tree control to it, ran the application and I could see the Dialog with all the the controls. I added another dialog to the SDIDOCVIEW application added a tree control and an edit control to the dialog and used the code shown in my previous post, for the "Resizable dialog view" for my new dialog and then ran the application. I could see the Control Bar, but could not see the my Dialog on the control bar or any of its controls. I had already did what you suggested an made the window styles in the "Resiable dialog view" match those of my new dialog.

I would appreciate any suggestions. This seems to be very trivial but I can’t see why it doesn’t work.

Regards

Dave

Technical Support Jul 21, 2007 - 12:09 PM

We guess you are using popup dialogs instead of child dialogs. If you want, please send us a modified version of our sample application so we can help you.

Suhai Gyorgy Jul 21, 2007 - 3:53 AM

It would be good to see CMainFrame::OnCreate and the dialog’s resource code from your application’s .rc file.

Of course the best would be if you could upload the modified SDIDOCVIEW sample for us to see it "in action". :)

David Ian Jul 24, 2007 - 7:08 AM

Thanks very much guys, I’ve solved it. The solution was not only to set the Dialog window style with WS_VISIBLE, but to make sure all the controls on the dialogs styles are also set with WS_VISIBLE.

David