Solved

Where is WS_EX_CLIENTEDGE coming from?

Posted on 1997-03-25
6
690 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

743 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

10 Experts available now in Live!

Get 1:1 Help Now