Solved

Where is WS_EX_CLIENTEDGE coming from?

Posted on 1997-03-25
6
707 Views
Last Modified: 2013-11-20
I have a window derived from CSplitterWnd in an OCX.  When the window is drawn (with or without splitter bars) it appears to have the 3d border WS_EX_CLIENTEDGE.  I want to turn this off but I’ve checked the Splitter’s window styles using Spy and it isn’t set.

Any ideas where this could be coming from?

Thanks,
Steve Kinney
kinney @ Filenet.com  

0
Comment
Question by:skin
  • 4
  • 2
6 Comments
 
LVL 1

Accepted Solution

by:
rhgaracci earned 100 total points
ID: 1300681
Unfortunately, there are no splitter style options, in spite of the fact that it appears to be the style that you cited.  The only way to customize the splitter bars is to override the virtual member function CSplitterWnd::OnDrawSplitter.  The MFC version of this is in file  ...\mfc\src\WINSPLIT.CPP.  You could copy this function and change the calls to Draw3dRect to use the same colors for both sides of the lines.  This would elimate the 3d look.  You could also use another rectangle drawing methods such as FrameRect with a solid brush.

Of course, if you don't have the source for the OCX, you are probably out of luck.
0
 

Author Comment

by:skin
ID: 1300682
Edited text of question
0
 
LVL 1

Expert Comment

by:rhgaracci
ID: 1300683
Since you do have a derived window, then you must override OnDrawSplitter() as I described in my answer.  Again, the easiest way is to cut and paste the code and then edit the drawing code.

If you just fake out 3d rect by using the same color, use the color that is used to fill the middle of the rect at the bottom of the MFC method which is

       COLORREF clr = afxData.clrBtnFace;

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Expert Comment

by:rhgaracci
ID: 1300684
I would be curious about what your parent window is for the splitter window.  Splitter Windows are generally embedded in a CFrameWnd (or derived) class.
0
 
LVL 1

Expert Comment

by:rhgaracci
ID: 1300685
I appears that the window borders are being drawn by the same OnDrawSplitter() method called from DrawAllSplitBars().
0
 

Author Comment

by:skin
ID: 1300686
The CSplitterWnd is in an OCX.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Process filename extension 3 208
Change owner from userA to server Local Administrators 7 71
sumDigits challenge 9 171
fix34  challenge 9 163
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question