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 » CExtPageContainerWnd Issues... (one year later) Collapse All
Subject Author Date
Emil Pop Feb 28, 2005 - 2:41 PM

Hi


On May 5, 2004 I posted a message called: CExtPageContainer Issues...
that was related to Prof-UIS 2.24.


The issues were:
1. redundant refresh of CExtPageContainerWnd pages
2. the background of some controls in the pages was not refreshing properly.



You e-mailed me a patch addressing those problems. That patch would become a part of Prof-UIS 2.25.


There was another issue I did not mention, that was also fixed in the patch you sent: the icons in the CExtPageContainerWnd pages were not refreshed when the page caption was clicked or whenever the pages were sent to the bottom of the container.


Everything worked fine until I tried upgrading to Prof-UIS 2.27 ( and eventually Prof-UIS 2.30).


In these latter versions the icons are again not refreshed. Would it be possible for you to help me with this snag.


Thank you.


Emil


Gettica Inc


 

Technical Support Mar 1, 2005 - 4:37 AM

Dear Emil,

We are ready to help you and fix the bug as soon as possible. Please give us more info on it or, if it’s possible, send us a test project that demonstrates the problem.

Emil Pop Mar 1, 2005 - 9:20 PM

Hi,


I sent to support@fossware.com the project emphasizing the bug I mentioned.


Build it successively with version 2.25 and 2.30 and you will notice the difference.


Before building the project
 - copy the file ExtMemoryDC.h in the include folder (it is currently in src).
 - set the environment variable PRO_UI_HOME to the root of Prof-UIS installation


Build the Debug Configuration
 
This project compiles OK with 2.25. However, in version 2.30 you have to comment/uncomment some lines where the interface PaintDockerBkgnd() has changed. I couldn’t detect the lib version since the macro __PROF_UIS_VERSION_DWORD is unusable in #if preprocessing directives.


Run the program, right-click and on the pop-up menu select Toolbox. In the page container,
press the caption called Graph Options. In the version 2.30 the icons in the page will disappear.


Emil


Gettica Inc.

Technical Support Mar 3, 2005 - 2:28 AM

Dear Emil,

 

We received your project, but it cannot be compiled. Here is the contents of the Output window produced after a batch build has been made for all your projects:

 

------ Rebuild All started: Project: GTools, Configuration: Debug Win32 ------

Deleting intermediate files and output files for project ’GTools’, configuration ’Debug|Win32’.

Compiling...

cl : Command line warning D4028 : minimal rebuild failure, reverting to normal build

GTools.cpp

GTools\GTools.cpp(0) : fatal error C1033: cannot open program database ’h:\zobj\debug\gtools\vc70.pdb’

Project : warning PRJ0018 : The following environment variables were not found:

$(META_HOME)

$(BOOST_HOME)

Build log was saved at "file://C:\zobj\Debug\GTools\BuildLog.htm"

GTools - 1 error(s), 1 warning(s)

 

------ Rebuild All started: Project: GUITools, Configuration: Debug Win32 ------

Deleting intermediate files and output files for project ’GUITools’, configuration ’Debug|Win32’.

Compiling...

cl : Command line warning D4028 : minimal rebuild failure, reverting to normal build

GSlider.cpp

c1xx : fatal error C1083: Cannot open compiler intermediate file: ’\zobj\Debug\GUITools/GUITools.pch’: No such file or directory

Project : warning PRJ0018 : The following environment variables were not found:

$(META_HOME)

$(PRO_UI_HOME)

Build log was saved at "file://C:\zobj\Debug\GUITools\BuildLog.htm"

GUITools - 1 error(s), 1 warning(s)

 

------ Rebuild All started: Project: FW, Configuration: Debug Win32 ------

Deleting intermediate files and output files for project ’FW’, configuration ’Debug|Win32’.

Compiling...

cl : Command line warning D4028 : minimal rebuild failure, reverting to normal build

ChildFrm.cpp

c1xx : fatal error C1083: Cannot open compiler intermediate file: ’\zobj\Debug\FW/FW.pch’: No such file or directory

CommandLineInfo.cpp

c1xx : fatal error C1083: Cannot open compiler intermediate file: ’\zobj\Debug\FW/FW.pch’: No such file or directory

stdafx.cpp

c1xx : fatal error C1083: Cannot open compiler intermediate file: ’\zobj\Debug\FW/FW.pch’: No such file or directory

MainFrm.cpp

c1xx : fatal error C1083: Cannot open compiler intermediate file: ’\zobj\Debug\FW/FW.pch’: No such file or directory

GModuleContext.cpp

c1xx : fatal error C1083: Cannot open compiler intermediate file: ’\zobj\Debug\FW/FW.pch’: No such file or directory

GFWBridge.cpp

c1xx : fatal error C1083: Cannot open compiler intermediate file: ’\zobj\Debug\FW/FW.pch’: No such file or directory

GDocManager.cpp

c1xx : fatal error C1083: Cannot open compiler intermediate file: ’\zobj\Debug\FW/FW.pch’: No such file or directory

FWView.cpp

c1xx : fatal error C1083: Cannot open compiler intermediate file: ’\zobj\Debug\FW/FW.pch’: No such file or directory

FWDoc.cpp

c1xx : fatal error C1083: Cannot open compiler intermediate file: ’\zobj\Debug\FW/FW.pch’: No such file or directory

FW.cpp

c1xx : fatal error C1083: Cannot open compiler intermediate file: ’\zobj\Debug\FW/FW.pch’: No such file or directory

CntrItem.cpp

c1xx : fatal error C1083: Cannot open compiler intermediate file: ’\zobj\Debug\FW/FW.pch’: No such file or directory

CMDIClientWnd.cpp

c1xx : fatal error C1083: Cannot open compiler intermediate file: ’\zobj\Debug\FW/FW.pch’: No such file or directory

Project : warning PRJ0018 : The following environment variables were not found:

$(META_HOME)

$(PRO_UI_HOME)

Build log was saved at "file://C:\zobj\Debug\FW\BuildLog.htm"

FW - 12 error(s), 1 warning(s)

 

---------------------- Done ----------------------

Rebuild All: 0 succeeded, 3 failed, 0 skipped

 

Please send us a compilable project without explicit dependencies and we will immediately help you.

Emil Pop Mar 3, 2005 - 9:45 PM

I sent to support@fossware.com the new projects.

I removed the BOOST_HOME and META_HOME variables: I apologize for missing them the first time.

 

However you need to set the environment variable PRO_UI_HOME to indicate where Prof-UIS is located on your machine.

 

The two main projects are just slightly different ( due to the change in the interface of PaintDockerBkgnd() occurring after version 2.30).

 

I also appended the zip file of the patch you sent me a year ago: curiously enough, the official versions 2.25 and 2.25.1 have the same bug as 2.30. Only the patch you sent me ( and I am returning to you now) seems to work correctly.

 

Emil

Technical Support Mar 4, 2005 - 9:05 AM

We have successfully compiled and analyzed your projects. All dialogs in your page container and all child window inside the dialog should have both the WS_CLIPCHILDREN and WS_CLIPSIBLINGS styles applied. Besides, please subclass all icons in dialogs with CExtLabel. After that everything should work as designed.

Emil Pop Mar 4, 2005 - 10:29 AM

Hi,


I made the following changes:



  • I derived the GStaticIcon directly from CExtLabel and I removed the virtual function virtual LRESULT WindowProc( UINT uMsg, WPARAM wParam, LPARAM lParam); from GStaticIcon such that the version in CExtLabel is called.

  • In GUITools.rc I added the style WS_CLIPSIBLINGS to the dialog boxes used as pages inside the container ( WS_CLIPCHILDREN  was already there)

Now the icons do not show up at all. Is there something else I am missing here? Would it be possible for you to modify the project I sent you and email it back to me?


Please also note that the design with a GStaticIcon and overwriting virtual LRESULT WindowProc( UINT uMsg, WPARAM wParam, LPARAM lParam); was suggested by Prof-UIS Support a year ago and I was pretty happy with it until now.


Anyways, you could also have a look at my previous comment regarding the code you pulled out of CExtPaintManager. If you feel OK with having it back in the library code it would solve all the problems related to this issue. (I also copied that code into version 2.30 of the library and now everything is OK).


Thank you,


Emil

Emil Pop Mar 4, 2005 - 9:50 AM

Thank you,


I’ll try that.


In the meanwhile, I checked the difference between the official version and the patch you sent me: the official 2.25 version has commented out the lines 2059 - 2070 in the file src/ExtPaintManager.cpp.


bool CExtPaintManager::stat_DefIsHwndNeedsDirectRepaint(
 HWND hWndChild
 )
{
DWORD dwChildStyle =
  DWORD( GetWindowLong(hWndChild,GWL_STYLE) );
/*
 if( (dwChildStyle&WS_CHILD) == 0 )
  return true;
 else if( (dwChildStyle&WS_CLIPSIBLINGS) != 0 )
  return false;


/// -DY (2.25)
 
HWND hWndParent = ::GetParent( hWndChild );
 if( hWndParent != NULL )
 {
  DWORD dwParentStyle =
   DWORD( GetWindowLong(hWndParent,GWL_STYLE) );
  if( (dwParentStyle&WS_CLIPCHILDREN) != 0 )
   return false;
 } // if( hWndParent != NULL )
*/


CExtSafeString sClassName;
 ::GetClassName(
  hWndChild,
  sClassName.GetBuffer( _MAX_PATH+1 ),
  _MAX_PATH
  );
 sClassName.ReleaseBuffer();
 sClassName.MakeLower();
 if( sClassName == LPCTSTR( _T("static") ) )
  return true;
 if( sClassName == LPCTSTR( _T("systabcontrol32") ) )
  return true;
 if( sClassName == LPCTSTR( _T("msctls_trackbar32") ) )
  return true;
 if(  sClassName == LPCTSTR( _T("button") )
  && ( g_PaintManager.m_bUxValidColorsExtracted
   || (dwChildStyle&0x0F) == BS_DEFPUSHBUTTON
   || (dwChildStyle&0x0F) == BS_PUSHBUTTON
   || (dwChildStyle&0x0F) == BS_CHECKBOX
   || (dwChildStyle&0x0F) == BS_AUTOCHECKBOX
   || (dwChildStyle&0x0F) == BS_RADIOBUTTON
   || (dwChildStyle&0x0F) == BS_3STATE
   || (dwChildStyle&0x0F) == BS_AUTO3STATE
   || (dwChildStyle&0x0F) == BS_GROUPBOX
   || (dwChildStyle&0x0F) == BS_AUTORADIOBUTTON
   )
  )
  return true;
 return false;
}


 


If I uncomment those lines as they were in the patch you sent me, everything works fine, even if I do not mention WS_CLIPCHILDREN and WS_CLIPSIBLINGS styles in the children windows.


Was there a stringent reason to take those lines out of the code?


Emil

Technical Support Mar 4, 2005 - 11:50 AM

From our experience, we are convinced that it is not possible to code absolutely flicker free windows without using WS_CLIPCHILDREN and WS_CLIPSIBLINGS styles. But if you decide to use these styles in a dialog window, you will have to subclass most of the common controls with Prof-UIS classes because any control like the check box or static text is based on the background of its parent window. All Prof-UIS controls perform complete repainting of the window background.

Emil Pop Mar 4, 2005 - 4:33 PM

Hi,


It is not clear to me what you suggested: I made the changes you indicated on Mar 4, 2005 - 9:05 AM but they do not work (i.e., the icons do not show at all). What I was asking in the message I sent on Mar 4, 2005 - 10:29 AM was:



  • either to email me back the project I had sent with your changes such that the icons are correctly displayed

  • or to have a look on the reason you changed the code in ExtPaintManager.cpp and to see whether that code is solving the problem.

 


Thanks,


Emil

Technical Support Mar 9, 2005 - 4:59 AM

We apologize for the delay with this answer. We have modified your project and sent it to you by e-mail. Now all the CStatic-based controls in your project are replaced with CExtLabel controls "as is". Besides, we forgot to mention one important thing: The page container control in your "Toolbox" resizable control bar should also have WS_CLIPCHILDREN and WS_CLIPSIBLINGS windows styles turned on.

Emil Pop Mar 13, 2005 - 10:29 AM

The example works well with Win2000 and WinXP look-and-feel. However, if you try Win2003, the problem is still the same. Simply add


 OnViewLikeOffice2003();



int
CMainFrame::OnCreate                  ( LPCREATESTRUCT lpCreateStruct)
{


 /* ... */


 mToolboxIsVisble=m_oPageContainerParentBar_.IsVisible () ? true : false;
 showToolBox (false);
 OnViewLikeOffice2003();
 return 0;
}


and you’ll notice both the flickering and the fact the icons do not refresh in the page conteiner. I assume this is the reason you told me to insert the GStaticIcon class and you sent me the 225 patch.


Emil


 

Technical Support Mar 14, 2005 - 7:01 AM

We will take a look at this once more and try to find an appropriate solution.

Emil Pop Mar 29, 2005 - 7:03 AM

Anything new on this one?


Thanks,


Bogdan

Technical Support Mar 29, 2005 - 11:14 AM

Dear Bogdan,

We have not encountered any problems with dialog pages on the Windows 2003 Server Standard Edition. We used this version of the PageContainer sample. The bottom page of the page container has both a bitmap and icon items. They produce no flickering.

Emil Pop Mar 30, 2005 - 11:23 AM

The problem I have is not with the operating system but with the look and feel of the sample.


If, in the sample you sent me, one changes the look and feel to


 OnViewLikeOffice2003();


( the way I detailed in the message I posted on Mar 13, 2005 - 10:29 AM),


the dialog box starts flickering and the icons are not refreshed (no matter the OS one is running on).


I apologize if I didn’t describe clearly the issue and I would like to thank you for your help.


Hopefully we’ll be able to sort this out.


Emil

Technical Support Apr 1, 2005 - 8:05 AM

We sent you a sample that does not produce any flickering on any OS. So, it seems the problem hides somewhere in your source code. Could we help you with debugging it? Could you send us your project once more?

Emil Pop Apr 6, 2005 - 9:01 PM

Hi,


I’ve sent you the project you had emailed me. The only change I made was to specufy the 2003 look and feel. In the bind folder you’ll find the executable and the DLLs. If you run it, right click, select the toolbox and then slide the pages in the container you’ll notice the icons do not refresh. The executable is a ’Debug’ build but I removed the objs and pdbs to make the zip smaller. You could build it yourselves if you specify the environment variable PRO_UI_HOME pointing to the home directory of the Prof-uis installation.


Emil

Technical Support Apr 8, 2005 - 3:11 AM

We sent you a solution that eliminates the icon flicker problem in the toolbox window.