Click here to Skip to main content
13,198,850 members (44,341 online)
Click here to Skip to main content
Add your own
alternative version


122 bookmarked
Posted 27 Jan 2001

A Flat Splitter Window

, 30 Jan 2003
Rate this:
Please Sign up or sign in to vote.
A small class that gives splitter-windows a flat look
  • Download source files - 22 Kb
  • <!-- Link to demo file download -->
  • Download demo project - 10 Kb
  • Sample Image - FlatSplitter.gif


    This is a small class that replaces the default MFC splitter window CSplitterWnd with a splitter that has a small (flat) border. It's a very small class (only about 10 lines of code excluding all the standard MFC stuff), but i thought this might be useful for someone.

    Basically, you would use this splitter if you want a GUI like the one in the (newest) "Start->Find->Files or Folders" window. This effect can't be achieved with the standard splitter window, because it draws a WS_EX_CLIENTEDGE-like border.


    This is very simple to use, just do whatever you would do with a normal splitter, but replace CSplitterWnd with CFlatSplitterWnd, and don't forget to #include "FlatSplitterWnd.h".

    Update & Credits

    This latest version now supports multiple CFlatSplitterWnd's inside of each other, like the demo app shows it. All of this thanks to Kris ( - Cheers


    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here


    About the Author

    Marc Richarme
    Engineer Nokia
    Denmark Denmark
    My programming experience started a long time ago in
    QBasic (on a 25MHz 486).
    I'm now mainly using Java, C++, C, MFC, Perl and PHP, but have used quite a number of other languages as well for various projects.

    You may also be interested in...

    Comments and Discussions

    GeneralCHtmlView Pin
    Peder Alm19-Jun-01 2:05
    memberPeder Alm19-Jun-01 2:05 
    GeneralRe: CHtmlView Pin
    Marc Richarme23-Aug-01 14:39
    memberMarc Richarme23-Aug-01 14:39 
    GeneralRe: CHtmlView Pin
    Anonymous11-Mar-02 19:26
    memberAnonymous11-Mar-02 19:26 
    GeneralRe: CHtmlView Pin
    ChiPlastique18-Aug-04 4:36
    memberChiPlastique18-Aug-04 4:36 
    GeneralRe: CHtmlView Pin
    xiang_yan26-Dec-10 16:14
    memberxiang_yan26-Dec-10 16:14 
    QuestionOnDrawSplitter unnecessary? Pin
    Ron van Gelderen22-Apr-01 0:59
    memberRon van Gelderen22-Apr-01 0:59 
    AnswerRe: OnDrawSplitter unnecessary? Pin
    Marc Richarme23-Aug-01 14:43
    memberMarc Richarme23-Aug-01 14:43 
    GeneralRe: OnDrawSplitter unnecessary? Pin
    Ken Griggs11-Mar-02 7:11
    memberKen Griggs11-Mar-02 7:11 
    Well done, Marc! This is exactly what I needed, trivial though it is.

    For those of you that haven't read the source that accompanies this article, it turns out that the OnDrawSplitter function does actually need to be implemented to correct a minor drawing bug in CSplitterWnd that is exposed using this simple technique of setting the border sizes (etc.). However, Marc has uploaded a correct version that uses this simplified technique and that corrects the bug.

    -Ken Griggs
    GeneralRe: OnDrawSplitter unnecessary? Pin
    Lim, Jongho17-Mar-02 21:50
    memberLim, Jongho17-Mar-02 21:50 
    QuestionWhat does FLAT mean for you? Pin
    Anonymous29-Jan-01 4:23
    memberAnonymous29-Jan-01 4:23 
    AnswerRe: What does FLAT mean for you? Pin
    David Wulff29-Jan-01 5:27
    memberDavid Wulff29-Jan-01 5:27 
    GeneralRe: What does FLAT mean for you? Pin
    AlexMarbus29-Jan-01 6:31
    memberAlexMarbus29-Jan-01 6:31 
    GeneralRe: What does FLAT mean for you? Pin
    *Marc Richarme*29-Jan-01 8:27
    member*Marc Richarme*29-Jan-01 8:27 
    GeneralRe: What does FLAT mean for you? Pin
    AlexMarbus29-Jan-01 11:25
    memberAlexMarbus29-Jan-01 11:25 
    GeneralRe: What does FLAT mean for you? Pin
    Marc Richarme29-Jan-01 12:43
    memberMarc Richarme29-Jan-01 12:43 
    GeneralRe: What does FLAT mean for you? Pin
    Anonymous30-Jan-01 8:43
    memberAnonymous30-Jan-01 8:43 
    GeneralRe: What does FLAT mean for you? Pin
    Marc Richarme31-Jan-01 8:58
    memberMarc Richarme31-Jan-01 8:58 
    GeneralRe: What does FLAT mean for you? Pin
    Anonymous30-Jan-01 8:44
    memberAnonymous30-Jan-01 8:44 
    GeneralRe: What does FLAT mean for you? Pin
    xufeisjtu31-Mar-04 0:27
    memberxufeisjtu31-Mar-04 0:27 
    GeneralRe: What does FLAT mean for you? Pin
    Marc Richarme31-Mar-04 4:13
    memberMarc Richarme31-Mar-04 4:13 
    AnswerRe: What does FLAT mean for you? Pin
    yuban4-May-07 13:30
    memberyuban4-May-07 13:30 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

    Permalink | Advertise | Privacy | Terms of Use | Mobile
    Web02 | 2.8.171020.1 | Last Updated 31 Jan 2003
    Article Copyright 2001 by Marc Richarme
    Everything else Copyright © CodeProject, 1999-2017
    Layout: fixed | fluid