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 sizing and postioning CExtResizablePropertySheet/CExtResizablePropertyPage based Wizar Collapse All
Subject Author Date
Daljit Singh Jul 29, 2006 - 5:18 PM

Hi, I have many wizards CExtResizablePropertySheet/CExtResizablePropertyPage classes. I made it no-resizabe by including the follwoing lines in Initialization function.

ModifyStyle( WS_THICKFRAME, 0 );
ShowSizeGrip( FALSE );

Now we can not resize BUT some time wizard starts on the extreme left corner of the screen (instead of middle 0f application) and reduce it size. Its size become smaller and smaller everytime time we start that wizard. If you get lucky and another wizard start with the right size and position, then the first wizard starts behaving. But it happens again when we start anpplication again. Any suggestion?

Thanks.

Daljit Singh

Luc Dion Jul 31, 2006 - 3:31 PM

Hi, we have fixed this problem localy in the prof-uis library. The problem is that some CExtWS constructor doesn’t initialized some members, and the m_bEnableSaveRestore boolean is one of them. And the other thing is that the method EnableSaveRestore can only enable the save-restore feature, it cannot disable it.

We didn’t see any side-effect.

These modifications have been applied in the ExtTempl.h file:

CExtWS()        : m_bStyledWndInitDone( false )
        , m_bEnableSaveRestore( false )
        , m_bSysMenuTracking( false )
        , m_bShowResizingGripper( false )
    {
    }
    
    CExtWS(    UINT nIDTemplate,
        CWnd * pParentWnd    )
        :
        // *** FIX ***
         m_bStyledWndInitDone( false )
        , m_bEnableSaveRestore( false )
        , m_bSysMenuTracking( false )
        , m_bShowResizingGripper( false )
        ,
        // *** End FIX ***
         CExtWSBase( nIDTemplate, pParentWnd )
    {
    }
    
    CExtWS(    __EXT_MFC_SAFE_LPCTSTR lpszTemplateName,
        CWnd * pParentWnd
        )
        :
        // *** Begin FIX ***
         m_bStyledWndInitDone( false )
        , m_bEnableSaveRestore( false )
        , m_bSysMenuTracking( false )
        , m_bShowResizingGripper( false )
        ,
        // *** End FIX ***
         CExtWSBase( lpszTemplateName, pParentWnd )
    {
    }
    
    CExtWS(        UINT nIDTemplate,
            UINT nIDCaption = 0
            )
        :
        // *** Begin FIX ***
         m_bStyledWndInitDone( false )
        , m_bEnableSaveRestore( false )
        , m_bSysMenuTracking( false )
        , m_bShowResizingGripper( false )
        ,
        // *** End FIX ***
         CExtWSBase( nIDTemplate, nIDCaption )
    {
    }
    
    CExtWS(__EXT_MFC_SAFE_LPCTSTR lpszTemplateName,
UINT nIDCaption = 0
            )
        :
        // *** Begin FIX ***
         m_bStyledWndInitDone( false )
        , m_bEnableSaveRestore( false )
        , m_bSysMenuTracking( false )
        , m_bShowResizingGripper( false )
        ,
        // *** End FIX ***
         CExtWSBase( lpszTemplateName, nIDCaption )
    {
    }
    
    CExtWS(    UINT nIDCaption,
        CWnd *pParentWnd,
        UINT iSelectPage
        )
        :
        // *** Begin FIX ***
         m_bStyledWndInitDone( false )
        , m_bEnableSaveRestore( false )
        , m_bSysMenuTracking( false )
        , m_bShowResizingGripper( false )
        ,
        // *** End FIX ***
         CExtWSBase( nIDCaption, pParentWnd, iSelectPage )
    {
    }
    
    CExtWS(    __EXT_MFC_SAFE_LPCTSTR pszCaption,
        CWnd *pParentWnd,
        UINT iSelectPage
        )
        :
        // *** Begin FIX ***
         m_bStyledWndInitDone( false )
        , m_bEnableSaveRestore( false )
        , m_bSysMenuTracking( false )
        , m_bShowResizingGripper( false )
        ,
        // *** End FIX ***
         CExtWSBase( pszCaption, pParentWnd, iSelectPage )
    {
    }

Technical Support Aug 1, 2006 - 10:54 AM

Thank you for reporting the problem. We fixed all the problems in the CExtWS template and added the DisableSaveRestore() method:

 virtual void DisableSaveRestore()
 {
  m_bEnableSaveRestore = false;
 }
This will be available in the next version.

Daljit Singh Jul 29, 2006 - 5:22 PM

I am using version 2.54.

Technical Support Jul 31, 2006 - 8:56 AM

We can guess that the problem has to do in the window position/size saving/restoring algorithm. This feature is enabled by invoking the EnableSaveRestore() method. So please try to turn off this feature and let us know whether the problem persists. If yes, then please send us you project so we can check it.

Daljit Singh Jul 31, 2006 - 12:29 PM

I had this position/size problem. I tried using EnableSaveRestore() once in one of the wizard. I didn’t fix the problem. Then I removed this function call. The problem stil exists and it could happen in any other wizard.