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 » Several main frame window problems after upgrade to 2.70 freeware Collapse All
Subject Author Date
Andrej Kasa May 22, 2007 - 7:24 PM

Hello,

I upgraded today from 2.64 to 2.70 freeware (I am using WinXP SP2). I have an up and running app that has been using 2.64 until today (mainly using CExtPaintManagerOffice2007_R1 theme). It is SDI app using main frame window as CExtNCW < CFrameWnd >.

1)
When I push on minimize button on the main frame window there is no longer this default win minimize animation - is there a reason for that? Can I somehow turn on the default functionality of 2.64?

2)
Another problem is that I have been using "g_PaintManager.InstallPaintManager(RUNTIME_CLASS(*))" in the CMainFrame::OnCreate method before I displayed the app splash screen (I displayed the splash screen later in another class but this was not a problem since mentioned call to InstallPaintManager did not automatically displayed the window). Now after the upgrade to 2.70 the main frame window is displayed instantly so it is there all the time while the splash screen is visible and that looks weird (I prefer to display the splashscreen and ONLY AFTER the splashscreen disappear the mainframe window should appear) - is there a reason why is this happening (and the prior functionality was changed) or is it some sort of a bug? I can though move the InstallPaintManager call to a different class on different place so it is displayed later but that is not good to the design of my app. Is it possible to revert as well in this case to behavior of 2.64?

3)
I experience as well after the upgrade problems with minimizing the main frame window with ESC key. Following code in my app class does that:
BOOL CMyApp::PreTranslateMessage(MSG* pMsg)
{
    if (pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_ESCAPE)
    {
        m_pMainWnd->ShowWindow(SW_MINIMIZE);
        return TRUE;
    }
}
This works perferctly fine under 2.64 but mosty does not work under 2.70.

best regards,
krompo

Andrej Kasa May 25, 2007 - 1:20 PM

you can download my demo application from here:

http://kasa.chassco.net/IRMeasureBetaDemoProfUISBug.exe

Can you get some clues as why it may happen even without the sources?

krompo

Technical Support May 26, 2007 - 12:06 PM

Please ensure the following:

1) The splash window is displayed using SW_SHOWNOACTIVATE.
2) Some child window inside the main frame window gets focus after the main frame is displayed.

Andrej Kasa May 23, 2007 - 3:27 PM

thanks. regarding the third issue (pressing ESC to minimize main frame wnd) I did exactly what you suggested but the behaviour is identical as when it was in the app class. The detailed behaviour is following:
1) app starts and main window appear
2) I can not minimize by ESC until I click with mouse somewhere in the client area of the main frame (even if I just click on a menu item or somewhere in the middle of view - after then I can minimize but not until I do this procedure. However, when I minimize it this way (by pressing ESC) I see that your new minimize functionality is probably not used because I see the missing minimize animation I was talking about in the 1st issue. If I minimize anytime by pressing with mouse the minimize button - no animation is executed as described earlier (your new functionality). So since when I press ESC I see the animation probably I have to minimize the app by one of your new methods and not just by calling ShowWindow(SW_MINIMIZE)?

btw: if you have difficulties to simulate this behavior I can give you link to my app so you can troubleshoot it on your own.

regards,
krompo

Technical Support May 24, 2007 - 11:57 AM

We believe there must be something specific in your project that explains the behavior described in your message. Could you provide us with a project that reproduces this problem?

Technical Support May 23, 2007 - 9:39 AM

The non client are skinning code was re-written from scratch. The skinned non client areas in 2.64 has several critical issues when maximizing/minimizing/restoring on the desktops having: auto-hidden shell bars, Window Blinds software installed, DWM enabled desktop on Windows Vista. The window position changing is now 100% performed by the CExtNCW class - not by DefWindowProc() function.

Seems the second issue (related to the splash screen) is fixed after 2.70 release. Please update the source code for the following method:

int CExtMenuControlBar::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
      if (CExtToolControlBar::OnCreate(lpCreateStruct) == -1)
            return -1;
CFrameWnd * pFrame = _GetDockingFrameImpl();
      if( pFrame == NULL )
      {
            m_bPresubclassDialogMode = true;
            if( m_hWndHelper == NULL )
            {
                  m_hWndHelper = ::GetParent( m_hWnd );
                  ASSERT( m_hWndHelper != NULL );
                  ASSERT( ::IsWindow( m_hWndHelper ) );
                  if( !IsHookedWindow( m_hWndHelper ) )
                        SetupHookWndSink( m_hWndHelper );
            }
            return 0;
      }
      ASSERT_VALID( pFrame );
      ASSERT( ::IsWindow(pFrame->GetSafeHwnd()) );
      ASSERT( m_menuFrame.GetSafeHmenu() == NULL );
      ASSERT( m_menuDoc.GetSafeHmenu() == NULL );
      if( (pFrame->GetStyle()&WS_CHILD) == 0 )
      {
            HMENU hFrameMenu = pFrame->GetMenu()->GetSafeHmenu();
            if( hFrameMenu != NULL )
            {
                  m_menuFrame.Attach( hFrameMenu );
                  _UpdateMenuBar( FALSE );
                  pFrame->SetMenu( NULL );
            }
      }
HWND hWndMainFrame = _GetHwndMainFrame();
      if( hWndMainFrame != NULL )
      {
            CWnd * pWndForPlacement = stat_GetWndForPlacement( CWnd::FromHandle(hWndMainFrame) );
            if( ! SetupHookWndSink( pWndForPlacement->m_hWnd ) )
            {
                  ASSERT( FALSE );
                  return FALSE;
            }
            if( pWndForPlacement->m_hWnd != hWndMainFrame )
            {
                  if( ! SetupHookWndSink( hWndMainFrame ) )
                  {
                        ASSERT( FALSE );
                        return FALSE;
                  }
            }
            if(         pFrame->IsKindOf(RUNTIME_CLASS(CMDIFrameWnd))
                  ||    _IsMdiApp()
                  )
            {
                  m_bMdiApp = true;
                  HWND hWndMdiArea = _GetHwndMdiArea();
                  if( hWndMdiArea != NULL )
                  {
                        VERIFY( _InitMdiChildHook( hWndMdiArea ) );
                  }
                  else
                        SetTimer( 15, 10, NULL );
            }
            MSG msg;
            int i = 0;
            for( ; PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) && i < 1000; i++ )
            {
                  if( !AfxGetThread()->PumpMessage() )
                        break;
                  if( msg.message == WM_TIMER && msg.wParam == 15 )
                        break;
            }
      }
      return 0;
}
We cannot confirm third issue. Besides, you should pre-translate message in the main frame class instead of application class. The following code was used to test this issue in the SDI sample application:
BOOL CMainFrame::PreTranslateMessage(MSG* pMsg) 
{
    if (pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_ESCAPE)
    {
        ShowWindow(SW_MINIMIZE);
        return TRUE;
    }
      if( m_wndToolBarUiLook.PreTranslateMessage( pMsg ) )
            return TRUE;
      if( m_wndMenuBar.TranslateMainFrameMessage(pMsg) )
            return TRUE;
      return CExtNCW < CFrameWnd > :: PreTranslateMessage(pMsg);
}