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 Tech Support » This is bug ? Collapse All
Subject Author Date
tera t Nov 8, 2006 - 7:28 PM

Hello

SetInitDesiredPosFloating ( ptMy ); //
SetInitDesiredSizeFloating( czMy ); //
FloatControlBar( ptMy ); //
CFrameWnd * pFrame = GetParentFrame();
if( pFrame->IsKindOf( RUNTIME_CLASS( CMiniDockFrameWnd ) ) )
{
// It be displayed Float in CExtControlBar(profLoad)
// Unless I perform this setting.
// RecalcLayout does not work exe start just after that.
pFrame->ModifyStyle( 0 , FWS_SNAPTOBARS );

pFrame->RecalcLayout();
pFrame->SendMessage( WM_NCPAINT );
}

Technical Support Nov 9, 2006 - 11:25 AM

Unfortunately we failed to reproduce this bug. Could you modify one of our samples in a way to reproduce the bug and send this project to us?

tera t Nov 9, 2006 - 7:49 PM


Hello

(1), Please try to start two times of programs.

ttp://profuis0.tripod.com/20061110/SampleDlg1.lzh


(2), It is an additional question.

When I move a focus of CExtControlBar.
m_wndResizableBarDlg flickers.
I do not want to flicker.

Technical Support Nov 10, 2006 - 12:04 PM

1) We have not found any problems with your application. Would you tell us what the problem is? Any debug information and/or call stack would be very helpful.

2) To avoid flickering, turn on the Clip Children style for the dialog template in the resource editor. To make the dialog and all the dialog controls consistent with the currently used paint manager, please use corresponding Prof-UIS classes.

Here are the FAQ which may be helpful in this regard:

Static text controls used on the resizable dialog are flickering when it is resized. Besides, their background is inconsistent with that of the resizable dialog. How to resolve these problems?

I use CExtGroupBox and a set of controls. Some controls are not painted correctly, what may be wrong?



tera t Nov 12, 2006 - 9:16 PM

Hello

>1) We have not found any problems with your application. Would you tell us what the problem is? Any debug information and/or call stack would be very helpful.

ttp://profuis0.tripod.com/20061110/image01.jpg

Drawing size of the contents does not match size of a frame.

A reproduction procedure is as follows.
1) I start application.
2) I terminate application.
3) I start application.

ttp://profuis0.tripod.com/20061110/image01.jpg
Did it reappear?

Will not you understand a reproduction method?


Thank You

Technical Support Nov 14, 2006 - 11:23 AM

In the sample code we found the following lines. Why are you increasing the control bar’s size? The problem is in this code.

CSize csize;

csize = m_wndResizableBarCP.GetSizeFloating();

csize.cx = csize.cx + 100;

csize.cy = csize.cy + 100;

 

m_wndResizableBarCP.SetInitDesiredPosFloating ( CPoint(200,200) );

m_wndResizableBarCP.SetInitDesiredSizeFloating( csize );


tera t Nov 14, 2006 - 6:10 PM

Hello

>In the sample code we found the following lines. Why are you increasing the control bar’s size? The problem is in this code.

It is intentional.
FloatControlBar does not work rightly even if I carry out FloatControlBar after having done ProfLoad.

I prepared for this program to explain this movement.

For example, after the end of OnInitDialog.
Frame size does not change in FloatControlBar even if I call FloatControlBar in OnButtonX.
ttp://profuis0.tripod.com/20061110/image01.jpg

However, these problems are settled when they validate FWS_SNAPTOBARS.
ttp://profuis0.tripod.com/20061110/image01ok.jpg

Please validate pFrame-ModifyStyle( 0 , FWS_SNAPTOBARS ) .
A frame comes to be displayed definitely.

In other words, in ProfLoad, this FWS_SNAPTOBARS flag is becoming off.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This flag becomes effective when I operate a docking bar with a mouse.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
And FloatControlBar comes to work definitely.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I cannot perform resize of a frame in FloatControlBar unless I operate a docking bar.

Is this specifications of Prof-UIS?

---------------------------------------------------------------
CSize csize;
csize = m_wndResizableBarCP.GetSizeFloating();
csize.cx = csize.cx + 100;
csize.cy = csize.cy + 100;

m_wndResizableBarCP.SetInitDesiredPosFloating ( CPoint(200,200) ); //
m_wndResizableBarCP.SetInitDesiredSizeFloating( csize ); //
m_wndResizableBarCP.FloatControlBar( CSize (200,200) ); //
CFrameWnd * pFrame = m_wndResizableBarCP.GetParentFrame();

if( pFrame->IsKindOf( RUNTIME_CLASS( CMiniDockFrameWnd ) ) )
{
// It be displayed Float in CExtControlBar(profLoad)
// Unless I perform this setting.
// RecalcLayout does not work exe start just after that.
pFrame->ModifyStyle( 0 , FWS_SNAPTOBARS );
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

pFrame->RecalcLayout();
pFrame->SendMessage( WM_NCPAINT );
}
---------------------------------------------------------------

Technical Support Nov 15, 2006 - 1:26 PM

FWS_SNAPTOBARS is an MFC internal window style, which is used mainly with mini frame windows having control bars. This style is also used internally by Prof-UIS bars that are in the floating state. If this style is applied to the mini frame window, then it adjusts its size taking into account the size of its control bars. The toolbar, menu bar and panel control bar in Prof-UIS use this style in their floating mini frame windows. The resizable control bars remove this style. Your code should not do anything with the styles of floating mini frame windows to avoid unpredictable behavior of control bars. The following test project shows how to change the size of floating bars correctly at anytime.

tera t Nov 15, 2006 - 7:09 PM

Hello

By the way.
When a docking bar does "Float".
May I think that FWS_SNAPTOBARS is set by all means?

Thank you.

Technical Support Nov 16, 2006 - 1:38 PM

This style will be set for CExtToolControlBar windows and classes derived from code>CExtToolControlBar</code> (CExtMenuControlBar and CExtPanelControlBar). There will be no this style in all CExtControlBar windows.

Suhai Gyorgy Nov 10, 2006 - 3:10 AM

For your second question: use the CExtWFF template class for your m_wndResizableBar’s class, that is for eliminating flickering.

tera t Nov 12, 2006 - 10:17 PM

Hello

Thank You Very Much.

>For your second question: use the CExtWFF template class for your m_wndResizableBar
>’s class, that is for eliminating flickering.
>2) To avoid flickering, turn on the Clip Children style for the dialog template in the resource editor. To make the dialog and all the dialog controls consistent with the currently used paint manager, please use corresponding Prof-UIS classes.

>For your second question: use the CExtWFF template class for your m_wndResizableBar’s class, that is for eliminating flickering.

I programed it.
Is it good in this?

ttp://profuis0.tripod.com/20061113/image02.JPG
ttp://profuis0.tripod.com/20061113/SampleMuControlBarK.lzh

Thank You

Technical Support Nov 14, 2006 - 11:08 AM

You do not need to apply the CExtWFF template to CExtResizableDialog. To avoid flickering, just turn on the Clip Children style for the dialog template in the resource editor.

tera t Nov 15, 2006 - 1:27 AM

Hello

Thank You !

>You do not need to apply the CExtWFF template to CExtResizableDialog.
>To avoid flickering, just turn on the Clip Children style for the dialog template in the resource editor.

When I change a bar by mouse operation, it seems to take time slightly.
Will this be specifications of prof-UIS?

Technical Support Nov 15, 2006 - 1:28 PM

The speed of resizable control bar’s behavior depends on how heavy the window inside it. Besides the debug mode in Prof-UIS is much slower then the release mode due to very heavy assert checks everywhere.