Solved

Where is WS_EX_CLIENTEDGE coming from?

Posted on 1997-03-25
6
692 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sameEnds challenge 3 135
Hibernate methods 2 68
zeroFront challenge 7 80
fix34  challenge 9 105
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

867 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now