Solved

Where is WS_EX_CLIENTEDGE coming from?

Posted on 1997-03-25
6
698 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Expand LInux Boot partition remotly 3 90
Creating Labels and Frequency list style reports in SAS code 9 98
List out all word 7 293
changeXy challenge 13 82
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. …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.

777 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