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 » Problem with App Update Collapse All
Subject Author Date
Aaron Ellery Nov 21, 2003 - 5:49 AM

Hi,

Convertiing an MFC app tp prof-uis but have a few problems i can’t seem to overcome. Firstly when changing the format of the toolbars, i get an assertion error when trying to undock or move the toolbar. Also the images do not load (just get the blue square when hovering over the buttons, but there is no image). Have included all the libs and changed the classes.

Also is it possible to create control bars with the autohide feature within individual child windows? tried modifying the code in the MDI sample code......They hide OK, but when i move the mouse over the tab they flicker and then don’t show at all.

Any help is appreciated. Thanks for a great program!!!

Aaron.

Sergiy Lavrynenko Nov 21, 2003 - 7:01 AM

Dear Aaron,

Please verify the source code of your CMainFrame::OnCreate() method. It should invoke g_CmdManager->ProfileSetup() at the beginning (or g_CmdManager->ProfileWndAdd() in case of ProfileSetup() was invoked somewhere before). It also should use CExtControlBar::FrameEnableDocking( this ) instead of MFC frame’s EnableDocking( . . . ) near the end of the CMainFrame::OnCreate() method.

If your app using menu bar, please add the PreTranstateMessage() virtual method and invoke the m_wndMenuBar.TranslateMainFrameMessage() method like many library samples does.

The CFrameWnd provides OnBarCheck() and OnUpdateControlBarMenu() methods for handling command which are responsible for showing/hiding control bars. These methods may be used in the frame’s message map for handling commands which correspond to any Prof-UIS bars. But, if your app using auto-hiding feature, then you need to re-define these two methods. You may find them in the samples.

You wrote: Also is it possible to create control bars with the autohide feature within individual child windows? I have misunderstanding about word individual. The resizable bar component (the CExtControlBar class) was designed to hold only the one child window inside. In the most cases this window is a kind of child dialog (which may contain more complex layout of its child windows) or kind of a common control like edit, tree-view, list-view or list-box.

About tabs flicker effect: I know, tabbed-bar-container neither repaints tab window nor active child bar window when mouse is just moved over tabs. Please provide me with the details (what kinds of windows are inserted to resizable bars, etc.)

Do not hesitate to ask me if you still have difficulties.

Best regards, Sergiy.

Aaron Ellery Nov 21, 2003 - 7:41 AM

Hey Serg,

What i meant is, in your sample MDI application, you have control bars in each MDI child window. I used the following to allow them to have the ’hidden tab’ feature:

if( !CExtControlBar::FrameInjectAutoHideAreas(this) )
    {
        ASSERT( FALSE );
        return -1;
    }

They show as tabbed controls fine, but when i move the mouse over them the dialog does not ’come down’ as it should. Instead there is screen flicker and the dialog is not painted at all.

Also one last question (sorry if seems trivial, but am relatively new to MFC programming). When i try to add a a second ProfUIS type toolbar to my app, a transparent bar is created with nothing inside. Nothing is painted at all....I issued all the correct commands (followed the samples). What do u think this could be?

Thanks again.

Aaron.

Sergiy Lavrynenko Nov 21, 2003 - 10:27 AM

Hi Aaron,

I will try to find the answer for both riddles :-)

1) Flicker effect may be caused by invalid view window styles (a window which is inside MDI child frame or SDI frame). This view window must have the standard WS_CLIPSIBLINGS style. You may add it to the CREATESTRUCT::style in the CChildView::PreCreateWindow() virtual method.

2) Toolbar does not want to paint icons over its buttons because frame or dialog window (where toolbar is) was not attached to any command manager’s profile with invoke to g_CmdManager->ProfileSetup() or g_CmdManager->ProfileWndAdd().

Regards, Sergiy.

Aaron Ellery Nov 21, 2003 - 7:32 AM

Hey Serg,

What i meant is, in your sample MDI application, you have control bars in each MDI child window. I used the following to allow them to have the ’hidden tab’ feature:

if( !CExtControlBar::FrameInjectAutoHideAreas(this) )
    {
        ASSERT( FALSE );
        return -1;
    }

They show as tabbed controls fine, but when i move the mouse over them the dialog does not ’come down’ as it should. Instead there is screen flicker and the dialog is not painted at all.

Also one last question (sorry if seems trivial, but am relatively new to MFC programming). When i try to add a a second ProfUIS type toolbar to my app, a transparent bar is created with nothing inside. Nothing is painted at all....I issued all the correct commands (followed the samples). What do u think this could be?

Thanks again.

Aaron.

Aaron Ellery Nov 21, 2003 - 7:23 AM

Hey Serg,

What i meant is, in your sample MDI application, you have control bars in each MDI child window. I used the following to allow them to have the ’hidden tab’ feature:

if( !CExtControlBar::FrameInjectAutoHideAreas(this) )
    {
        ASSERT( FALSE );
        return -1;
    }

They show as tabbed controls fine, but when i move the mouse over them the dialog does not ’come down’ as it should. Instead there is screen flicker and the dialog is not painted at all.

Also one last question (sorry if seems trivial, but am relatively new to MFC programming). When i try to add a a second ProfUIS type toolbar to my app, a transparent bar is created with nothing inside. Nothing is painted at all....I issued all the correct commands (followed the samples). What do u think this could be?

Thanks again.

Aaron.