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 » CExtShellDialogFile Skin Collapse All
Subject Author Date
Johannes Schwenk Dec 8, 2009 - 12:24 PM

I have a Dialog with the following declaration:


class CSelectCourier : public CExtNCW < CExtResizableDialog >


This dialog is always Shown with the Current selected Skin of my Application (In my Case Office 2007).


 


How can i get the same Skin for a CExtShellDialogFile class Dialog?


 


 

Technical Support Dec 10, 2009 - 2:07 PM

This is hardly possible. Please run the ProfUIS_Controls sample application which does the same and contains several dialogs. Please check how the shell file dialog looks in it.

Technical Support Dec 9, 2009 - 1:27 PM

The file dialog should be skinned using theme 2007 and it should look like your main dialog. The shell file dialog uses the same global paint manager. But the shell file dialog on your screen shot uses some old theme like Office XP. If both main and file dialog are invoked from the same Prof-UIS based app, then they must use the same theme. But if your main dialog is part of some exe and file dialog is invoked from some MFC regular DLL, then these windows are using different copies of Prof-UIS and may use different UI themes.

Johannes Wisnewski Dec 10, 2009 - 7:29 AM

Ok, the Skinned Dialog is Declared in my App and is derived by CExtResizableDialog, the CExtFileDialog is Declared direct. I tried to show the dialog in one function:


    CExtShellDialogFile dlgFile(this, CExtShellDialogFile::__EFDT_SAVE);

    dlgFile.DoModal();

   

    CSelectCourier dlgTest(this);

    dlgTest.Initialize(30, "Title");

    dlgTest.DoModal();


CSelectCourier is Skinned, CExtShellDialog is not.


What is the solution? Do i have to declare a CExtShellDialogFile derived class in my App and use this instead of CExtShellDialogFile?


 

Technical Support Dec 8, 2009 - 12:53 PM

You should use the CExtShellDialogFile class as is. It’s fully themed by the currently installed paint manager. It’s already based on the CExtNCW template class if you are using any Visual Studio version but Visual Studio .NET 2002 (7.0). This is very specific issue. The Visual Studio .NET 2002 (7.0) is the worst C++ compiler ever released by Microsoft. The Visual C++ 6.0 release in 1998 (i.e. 4 years before 2002) is even much powerful C++ compiler. The Visual Studio .NET 2002 (7.0) has worst possible support of C++ templates. We simply was unable to compile the CExtNCW based version of the CExtShellDialogFile class with it. Probably we know why the next Visual Studio version was released very soon - only one year later. The Visual Studio .NET 2002 (7.0) is extremely rarely used now. If you are using any other Visual C++ version, then you should simply use the CExtShellDialogFile class as is.

Johannes Schwenk Dec 9, 2009 - 3:02 AM

My Version is Visual Studio 2005.


 


I`m using it as it is, but is is not skinned:


My CExtNCW Dialog:



 


And the CExtShellDialog File







In my MainFrame there are the following functions:


void CMainFrame::OnViewLikeOffice2007_R1()

{

    VERIFY(

        g_PaintManager.InstallPaintManager( new CExtPaintManagerOffice2007_R1 )

        );

    RecalcLayout();

    RedrawWindow(

        NULL,

        NULL,

        RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE

        | RDW_FRAME | RDW_ALLCHILDREN

        );

    CExtControlBar::stat_RedrawFloatingFrames( this );

    CExtControlBar::stat_RecalcBarMetrics( this );

}


void CMainFrame::OnUpdateViewLikeOffice2007_R1(CCmdUI* pCmdUI)

{

    pCmdUI->Enable();



    if (g_PaintManager->IsKindOf( RUNTIME_CLASS(CExtPaintManagerOffice2007_R1) ) ) {

        pCmdUI->SetRadio(true);

    }

    else {

        pCmdUI->SetRadio(false);

    }

}


 


What am I do wrong?