Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - Problem skinning CFileDialog
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problem skinning CFileDialog

 Post Reply Post Reply
Author
Message
Marco1 View Drop Down
Senior Member
Senior Member


Joined: 16 January 2004
Location: Germany
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marco1 Quote  Post ReplyReply Direct Link To This Post Topic: Problem skinning CFileDialog
    Posted: 27 July 2010 at 7:20pm
My application is skinned with blue Office2007 theme. No problem so far.

When a CFileDialog (Vista style) opens, it is skinned like every other dialog.

But there seems to be a skinning problem with the navigation bar, it's just black:


Now, if I disable new dialog skinning via:

XTPSkinManager()->SetAutoApplyNewWindows(FALSE);

before calling dlgFile.DoModal(), I get this:


The resize gripper down right is still skinned.
Tested under Windows 7 with MfC 13.4.0

Can someone give me an advice why both is happening?

Back to Top
Ark42 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 October 2003
Status: Offline
Points: 291
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ark42 Quote  Post ReplyReply Direct Link To This Post Posted: 30 April 2011 at 2:37am

I see the exact same issue. Also if you click the arrow next to the button that changes the view, you get this funny looking popup that is half skinned.



Back to Top
Ark42 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 October 2003
Status: Offline
Points: 291
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ark42 Quote  Post ReplyReply Direct Link To This Post Posted: 03 May 2011 at 4:14pm
I submitted an issue about this, since I still see it with Xtreme ToolkitPro v15.0.2 and Visual Studio 2010, and these work-arounds don't completely remove the skinning in the corner.

void CMyApp::OnFileOpen()
{
XTPSkinManager()->SetAutoApplyNewWindows(FALSE);
CWinApp::OnFileOpen();
XTPSkinManager()->SetAutoApplyNewWindows(TRUE);
}

BOOL CMyDoc::DoSave(LPCTSTR lpszPathName, BOOL bReplace)
{
XTPSkinManager()->SetAutoApplyNewWindows(FALSE);
BOOL bRet = CDocument::DoSave(lpszPathName, bReplace);
XTPSkinManager()->SetAutoApplyNewWindows(TRUE);
return bRet;
}
Back to Top
Marco1 View Drop Down
Senior Member
Senior Member


Joined: 16 January 2004
Location: Germany
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marco1 Quote  Post ReplyReply Direct Link To This Post Posted: 23 May 2011 at 2:10pm
I can still confirm the wrong left lower corner for 15.0.2 too.
Any progress or suggestions about this?
Back to Top
Ark42 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 October 2003
Status: Offline
Points: 291
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ark42 Quote  Post ReplyReply Direct Link To This Post Posted: 23 May 2011 at 2:15pm
My ticket issue #26583 is still open but has not been touched yet.
Back to Top
Marco1 View Drop Down
Senior Member
Senior Member


Joined: 16 January 2004
Location: Germany
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marco1 Quote  Post ReplyReply Direct Link To This Post Posted: 11 July 2011 at 9:08am
Back to Top
Marco1 View Drop Down
Senior Member
Senior Member


Joined: 16 January 2004
Location: Germany
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marco1 Quote  Post ReplyReply Direct Link To This Post Posted: 21 July 2011 at 4:12pm
Still having this problem in 15.1.1... Dead
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 22 July 2011 at 2:22am
Hello,

Sorry we don't consider this black line as some bug.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Willowmaster View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 July 2010
Location: Netherlands
Status: Offline
Points: 180
Post Options Post Options   Thanks (0) Thanks(0)   Quote Willowmaster Quote  Post ReplyReply Direct Link To This Post Posted: 22 July 2011 at 4:05am
I'm just curious. Do you use the SkinFramework for the skinning or the build in types? Because I could look into the skinfile to find the problem for you if you would like. (trying to get some experience with the skinbuilder. ;) )
Product: Xtreme SuitePro (ActiveX) version 15.3.1

Platform: Windows XP (32bit) - SP 3 (on VMWare)

Language: Visual Basic 6.0



Back to Top
Marco1 View Drop Down
Senior Member
Senior Member


Joined: 16 January 2004
Location: Germany
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marco1 Quote  Post ReplyReply Direct Link To This Post Posted: 22 July 2011 at 5:24am
Oleg, I don't mean the black line, it's about the gripper fragment at the right bottom corner when dlg is NOT skinned.
I know that you can't do anything on the black lines which are caused by MS special - that has been already discussed in some other forums in the net.

@Willowmaster: skinning is done via .cjstyle file, but in this case the dlg skinning is disabled but the blue gripper is still there.

Back to Top
Algae View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 January 2007
Location: United States
Status: Offline
Points: 217
Post Options Post Options   Thanks (0) Thanks(0)   Quote Algae Quote  Post ReplyReply Direct Link To This Post Posted: 09 May 2013 at 2:39pm
Hello Oleg,

I understand the black background/buttons etc in what I "think" is the explorer bar at the top of the CFileDialog is considered to be "by design".

My question is can this band be changed in the skin editor? If so, can you point me in the right direction to do so? What elements do I need to modify?

I've tried searching for the answer in the forums but haven't found an answer outside of disabling skinning for this particular dialog. If there is a post that shows how to do this, a link to the post would be helpful.

Thanks!
Back to Top
astoyan View Drop Down
Admin Group
Admin Group
Avatar

Joined: 24 August 2013
Status: Offline
Points: 304
Post Options Post Options   Thanks (0) Thanks(0)   Quote astoyan Quote  Post ReplyReply Direct Link To This Post Posted: 15 September 2013 at 8:59am
Hello everybody,

The "Black ReBar"  issue has been fixed and will be available in the next version of Xtreme ToolkitPro.
Thank you for your interest in Codejock products.

Regards,
  Alexander
Back to Top
tim00005 View Drop Down
Newbie
Newbie


Joined: 23 July 2013
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote tim00005 Quote  Post ReplyReply Direct Link To This Post Posted: 25 September 2013 at 6:26am
Note - gripper problem still there in 16.2.0 and also the normal text for file/folder names is incorrect as that is also being pulled from the skin. 
Back to Top
Algae View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 January 2007
Location: United States
Status: Offline
Points: 217
Post Options Post Options   Thanks (0) Thanks(0)   Quote Algae Quote  Post ReplyReply Direct Link To This Post Posted: 12 November 2013 at 3:03pm
Is this fixed in 16.2.4? Question

I hesitate to port all my library fixes/changes unless this is the case.

Thanks!
Back to Top
Algae View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 January 2007
Location: United States
Status: Offline
Points: 217
Post Options Post Options   Thanks (0) Thanks(0)   Quote Algae Quote  Post ReplyReply Direct Link To This Post Posted: 29 January 2014 at 7:25pm
I don't know about previous versions, but 16.2.6 corrects the black rebar problem. YES!

Whoever fixed it gets a big thank you!
Back to Top
cluster View Drop Down
Groupie
Groupie


Joined: 22 January 2015
Status: Offline
Points: 91
Post Options Post Options   Thanks (0) Thanks(0)   Quote cluster Quote  Post ReplyReply Direct Link To This Post Posted: 23 March 2016 at 12:07pm
I have the same problem with the CFileDialog and skin framework.
I use a dark theme skin and if I switch off by
XTPSkinManager()->SetAutoApplyNewWindows(FALSE);
CFileDialog fileDlg(TRUE);
fileDlg.DoModal();
XTPSkinManager()->SetAutoApplyNewWindows(TRUE);
I will get this behavior:






Back to Top
akur View Drop Down
Senior Member
Senior Member


Joined: 16 May 2006
Status: Offline
Points: 139
Post Options Post Options   Thanks (0) Thanks(0)   Quote akur Quote  Post ReplyReply Direct Link To This Post Posted: 05 April 2016 at 5:55am
On Windows 10, the sample "SkinCommCtrl" has a wrong context menu in standard FileOpen dialog (using version 1700):


Is a workaround other than disabling skinning of menu possible?
Can we hope for a fix in the next v17 release?
Back to Top
SvenC View Drop Down
Groupie
Groupie


Joined: 02 February 2007
Status: Offline
Points: 79
Post Options Post Options   Thanks (0) Thanks(0)   Quote SvenC Quote  Post ReplyReply Direct Link To This Post Posted: 05 April 2016 at 9:19am
Same in 17.1.0.

Plus: the edit controls (File name and directory combobox at top when putting the edit cursor inside) are too tiny. The height is not enough, so text gets clipped. There is a big white borders inside the controls while editing, so maybe it is just a wrong placement of the edit control inside the combo box.
--
SvenC

Toolkit Pro 15.3.1, 16.2.4, 16.3.1, 16.4.0, 17.2.0, 17.3.0, 18.0.1, 18.2 with VC++ 2010, 2012, 2013, 2015, 2017
Back to Top
Algae View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 January 2007
Location: United States
Status: Offline
Points: 217
Post Options Post Options   Thanks (0) Thanks(0)   Quote Algae Quote  Post ReplyReply Direct Link To This Post Posted: 05 April 2016 at 11:44am
I've noted the same context menu skinning problem with Win 10 as noted in an earlier post.

The problem appears at least back to version 16.26. The right-click context menu appears as a narrow bar.

The context menu problem goes away if first you set the skin to Default, then select another skin.

Obviously not a practical solution, but could provide some insight into what's gone wrong.
Back to Top
Marco1 View Drop Down
Senior Member
Senior Member


Joined: 16 January 2004
Location: Germany
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marco1 Quote  Post ReplyReply Direct Link To This Post Posted: 05 April 2016 at 3:30pm
I really gave up skinning this file dialog. It has never been working well.
Unfortunately with skinning disabled, as described in my initial post above, the bottom right blue corner still remains. Tested with 17.1.0

CJ, can you please try to fix this issue either way? Thanx!!

Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 06 April 2016 at 3:48am

Originally posted by SvenC SvenC wrote:

Plus: the edit controls (File name and directory combobox at top when putting the edit cursor inside) are too tiny. The height is not enough, so text gets clipped. There is a big white borders inside the controls while editing, so maybe it is just a wrong placement of the edit control inside the combo box.

This has been fixed, the fix will be available soon in v17.2
 Topic: V17.1 Malformed skinnings 
Back to Top
agontarenko View Drop Down
Admin Group
Admin Group


Joined: 25 March 2016
Status: Offline
Points: 291
Post Options Post Options   Thanks (0) Thanks(0)   Quote agontarenko Quote  Post ReplyReply Direct Link To This Post Posted: 10 May 2016 at 3:46am

"On Windows 10, the sample "SkinCommCtrl" has a wrong context menu in standard FileOpen dialog" - This has been fixed, the fix will be available in next beta or final release.
Back to Top
agontarenko View Drop Down
Admin Group
Admin Group


Joined: 25 March 2016
Status: Offline
Points: 291
Post Options Post Options   Thanks (0) Thanks(0)   Quote agontarenko Quote  Post ReplyReply Direct Link To This Post Posted: 18 June 2016 at 11:28am



This issue has been fixed, the fix will be available in next beta or final release.

Regards,
Artem Gontarenko
Back to Top
Algae View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 January 2007
Location: United States
Status: Offline
Points: 217
Post Options Post Options   Thanks (1) Thanks(1)   Quote Algae Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2016 at 3:52pm
I gave up waiting for the promised fix for "Windows 10 context menu in standard FileOpen dialog" where the right click menu is chopped into a narrow band.

After some experimentation, I devised a solution.

A little background first. I have been unable to use anything later than CJ 16.26 due to a number of critical flaws. That being said, you may or may not require the GetVersion replacement function described below.

The following should make the Windows 10 context menu both skin and function normally:

1. First we replace the Windows 10 disastrous GetVersion code so we actually know what OS it is.

Add this at the end of your Application header file. This should give you a working function to see if the client machine is Win 10.

AFX_INLINE BOOL EqualsMajorVersion(DWORD majorVersion)
{
    OSVERSIONINFOEX osVersionInfo;
    ::ZeroMemory(&osVersionInfo, sizeof(OSVERSIONINFOEX));
    osVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
    osVersionInfo.dwMajorVersion = majorVersion;
    ULONGLONG maskCondition = ::VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL);
    return ::VerifyVersionInfo(&osVersionInfo, VER_MAJORVERSION, maskCondition);
}

2. Next, add the following to your program initialization as shown:

BOOL CMyApp::InitInstance()
{
// initialize various things
...

// I inserted right after this line
LoadStdProfileSettings();  // Load standard INI file options (including MRU)

if ( EqualsMajorVersion(10) )
        XTPSkinManager()->SetApplyOptions(xtpSkinApplyMetrics | xtpSkinApplyColors | xtpSkinApplyFrame);

...
// continue initializing
}

The SkinManager Apply Options must be set to make the dialog work properly.

As always, your mileage may vary but it worked for me.

Back to Top
kstowell View Drop Down
Admin Group
Admin Group


Joined: 25 January 2003
Location: MIchigan, USA
Status: Offline
Points: 496
Post Options Post Options   Thanks (0) Thanks(0)   Quote kstowell Quote  Post ReplyReply Direct Link To This Post Posted: 27 August 2016 at 9:22am
Hi Algae, thank you for your suggestion, I will if we can get this problem resolved with our next release.
Kirk Stowell, President and CEO
CODEJOCK SOFTWARE SOLUTIONS<
Back to Top
cluster View Drop Down
Groupie
Groupie


Joined: 22 January 2015
Status: Offline
Points: 91
Post Options Post Options   Thanks (0) Thanks(0)   Quote cluster Quote  Post ReplyReply Direct Link To This Post Posted: 03 March 2017 at 11:10am
I think I am the only one who wants to use the CFileDialg together with skin framework.
It doesn't work with enable skin framework nor with disable by XTPSkinManager()->SetAutoApplyNewWindows(FALSE);
I mean is there an alternative for the CFileDialog??? Confused

Windows 7
Visual Studio 2010
CodeJock 17.3


Back to Top
astoyan View Drop Down
Admin Group
Admin Group
Avatar

Joined: 24 August 2013
Status: Offline
Points: 304
Post Options Post Options   Thanks (0) Thanks(0)   Quote astoyan Quote  Post ReplyReply Direct Link To This Post Posted: 03 March 2017 at 10:46pm
Can you please describe what exactly is not working for you with CFileDialog in details?
It is being used by many users and we we perform tests regularly, if it didn't work at all this would have been noticed and fixed already, so apparently it is specific to your use case. Have you tried to check any of our SkinFramework samples? If so, hasn't it still worked?

Regards,
  Alexander

Back to Top
cluster View Drop Down
Groupie
Groupie


Joined: 22 January 2015
Status: Offline
Points: 91
Post Options Post Options   Thanks (0) Thanks(0)   Quote cluster Quote  Post ReplyReply Direct Link To This Post Posted: 04 March 2017 at 4:19am
It is the same behavior as I have descripted already in my last post here for almost one year...
And if I enable the skin framework with dark theme it looks like this:



Back to Top
cluster View Drop Down
Groupie
Groupie


Joined: 22 January 2015
Status: Offline
Points: 91
Post Options Post Options   Thanks (0) Thanks(0)   Quote cluster Quote  Post ReplyReply Direct Link To This Post Posted: 14 May 2019 at 11:04am
Hi again,

Skin Framework (Dark theme) and CFileDialog or CFolderPickerDialog are not compatible.
There is no good way to solve this issue.
I have figured out that, if you enable only the option xtpSkinApplyFrame and xtpSkinApplyMetrics and disable the AutoApplyNewWindow flag then you will get the "normal" look.

But i need to enable the xtpSkinApplyColors option as well.
So now, my idea was to disable this option before creating the file dialog and enable again, but then the whole app will flicker horrible.

XTPSkinManager()->SetApplyOptions(xtpSkinApplyFrame | xtpSkinApplyMetrics);
XTPSkinManager()->SetAutoApplyNewWindows(FALSE);

CFolderPickerDialog dlgFile();
dlgFile.DoModal()...

XTPSkinManager()->SetAutoApplyNewWindows(TRUE);
XTPSkinManager()->SetApplyOptions(xtpSkinApplyFrame | xtpSkinApplyMetrics | xtpSkinApplyColors);

Could you bring the FileDialog (IFileDialog) to a black list from the skin framework as you do with the "Internet Explorer" and "OleMainThread" for example?

Windows 7
Visual Studio 2013
CodeJock 18.6
Back to Top
cluster View Drop Down
Groupie
Groupie


Joined: 22 January 2015
Status: Offline
Points: 91
Post Options Post Options   Thanks (0) Thanks(0)   Quote cluster Quote  Post ReplyReply Direct Link To This Post Posted: 16 May 2019 at 10:45am
Hi,
now, I have found a dirty solution to disable the skin framework for the CFileDialog and CFolderPickerDialog. Better than nothing! ;-)
Windows 7
Visual Studio 2013
CodeJock 18.6
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.