Click here to Skip to main content
11,412,833 members (71,264 online)
Click here to Skip to main content

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

    Introduction

    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.

    Usage

    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 (http://krisoftware.w.interia.pl) - Cheers

    License

    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

    Share

    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.

    Comments and Discussions

     
    QuestionNokia is goiong down.aren't you afraid Pin
    ldw1986hf123 at 28-Mar-12 7:00
    memberldw1986hf12328-Mar-12 7:00 
    QuestionLayoutRolCol() Pin
    Zaihuan Yu at 26-Sep-08 20:53
    memberZaihuan Yu26-Sep-08 20:53 
    GeneralThanks! Great example, very useful. Pin
    yuban at 4-May-07 14:34
    memberyuban4-May-07 14:34 
    GeneralChane Orientation Pin
    Ashok Jaiswal at 7-Apr-07 6:47
    memberAshok Jaiswal7-Apr-07 6:47 
    GeneralDecorated Splitter Bar Pin
    John Simmons / outlaw programmer at 8-Sep-06 10:12
    memberJohn Simmons / outlaw programmer8-Sep-06 10:12 
    General&amp;#24456;&amp;#22909;&amp;#21568; Pin
    lovexinqing at 30-May-03 7:52
    memberlovexinqing30-May-03 7:52 
    GeneralRe: œkD™Þ Pin
    Tsinghero at 3-Jun-03 21:23
    memberTsinghero3-Jun-03 21:23 
    QuestionHow to change the style of the splitter between each view. Pin
    Jack_Cai at 24-Apr-03 17:36
    memberJack_Cai24-Apr-03 17:36 
    Generalgood Pin
    zhongl at 15-Jul-02 15:38
    memberzhongl15-Jul-02 15:38 
    QuestionMouse click? Pin
    mohanrajh at 4-May-02 18:23
    membermohanrajh4-May-02 18:23 
    Generalinside nested splitter Pin
    Justin Matthews at 19-Mar-02 12:29
    memberJustin Matthews19-Mar-02 12:29 
    GeneralRe: inside nested splitter Pin
    Bartosz Bien at 21-Jun-02 22:01
    memberBartosz Bien21-Jun-02 22:01 
    GeneralRe: inside nested splitter Pin
    willi at 27-Nov-02 2:50
    memberwilli27-Nov-02 2:50 
    GeneralRe: inside nested splitter Pin
    vinodkbyreddy at 17-Mar-04 20:54
    membervinodkbyreddy17-Mar-04 20:54 
    GeneralRe: inside nested splitter Pin
    WarChildWTS at 1-Sep-05 19:59
    memberWarChildWTS1-Sep-05 19:59 
    Actually, that will not work. The best solution that I've found is to use (in this case) m_wndSplitterLeft.GetParentFrame()->SetColumnInfo(column_to_resize,ideal_x_size,min_x_size);
    that should take care of it. At least it worked for me.

    -- modified at 1:00 Friday 2nd September, 2005
    GeneralLimiting splitter bar moves Pin
    TBiker at 10-Dec-01 12:07
    memberTBiker10-Dec-01 12:07 
    GeneralRe: Limiting splitter bar moves Pin
    Marc Richarme at 12-Dec-01 5:15
    memberMarc Richarme12-Dec-01 5:15 
    GeneralRe: Limiting splitter bar moves Pin
    TBiker at 12-Dec-01 5:51
    memberTBiker12-Dec-01 5:51 
    GeneralRe: Limiting splitter bar moves Pin
    TBiker at 14-Dec-01 6:51
    memberTBiker14-Dec-01 6:51 
    GeneralRe: Limiting splitter bar moves Pin
    xiang_yan at 26-Dec-10 17:41
    memberxiang_yan26-Dec-10 17:41 
    GeneralCHtmlView Pin
    Peder Alm at 19-Jun-01 3:05
    memberPeder Alm19-Jun-01 3:05 
    GeneralRe: CHtmlView Pin
    Marc Richarme at 23-Aug-01 15:39
    memberMarc Richarme23-Aug-01 15:39 
    GeneralRe: CHtmlView Pin
    Anonymous at 11-Mar-02 20:26
    memberAnonymous11-Mar-02 20:26 
    GeneralRe: CHtmlView Pin
    ChiPlastique at 18-Aug-04 5:36
    memberChiPlastique18-Aug-04 5:36 
    GeneralRe: CHtmlView Pin
    xiang_yan at 26-Dec-10 17:14
    memberxiang_yan26-Dec-10 17:14 
    QuestionOnDrawSplitter unnecessary? Pin
    Ron van Gelderen at 22-Apr-01 1:59
    memberRon van Gelderen22-Apr-01 1:59 
    AnswerRe: OnDrawSplitter unnecessary? Pin
    Marc Richarme at 23-Aug-01 15:43
    memberMarc Richarme23-Aug-01 15:43 
    GeneralRe: OnDrawSplitter unnecessary? Pin
    Ken Griggs at 11-Mar-02 8:11
    memberKen Griggs11-Mar-02 8:11 
    GeneralRe: OnDrawSplitter unnecessary? Pin
    Lim, Jongho at 17-Mar-02 22:50
    memberLim, Jongho17-Mar-02 22:50 
    QuestionWhat does FLAT mean for you? Pin
    Anonymous at 29-Jan-01 5:23
    memberAnonymous29-Jan-01 5:23 
    AnswerRe: What does FLAT mean for you? Pin
    David Wulff at 29-Jan-01 6:27
    memberDavid Wulff29-Jan-01 6:27 
    GeneralRe: What does FLAT mean for you? Pin
    AlexMarbus at 29-Jan-01 7:31
    memberAlexMarbus29-Jan-01 7:31 
    GeneralRe: What does FLAT mean for you? Pin
    *Marc Richarme* at 29-Jan-01 9:27
    member*Marc Richarme*29-Jan-01 9:27 
    GeneralRe: What does FLAT mean for you? Pin
    AlexMarbus at 29-Jan-01 12:25
    memberAlexMarbus29-Jan-01 12:25 
    GeneralRe: What does FLAT mean for you? Pin
    Marc Richarme at 29-Jan-01 13:43
    memberMarc Richarme29-Jan-01 13:43 
    GeneralRe: What does FLAT mean for you? Pin
    Anonymous at 30-Jan-01 9:43
    memberAnonymous30-Jan-01 9:43 
    GeneralRe: What does FLAT mean for you? Pin
    Marc Richarme at 31-Jan-01 9:58
    memberMarc Richarme31-Jan-01 9:58 
    GeneralRe: What does FLAT mean for you? Pin
    Anonymous at 30-Jan-01 9:44
    memberAnonymous30-Jan-01 9:44 
    GeneralRe: What does FLAT mean for you? Pin
    xufeisjtu at 31-Mar-04 1:27
    memberxufeisjtu31-Mar-04 1:27 
    GeneralRe: What does FLAT mean for you? Pin
    Marc Richarme at 31-Mar-04 5:13
    memberMarc Richarme31-Mar-04 5:13 
    AnswerRe: What does FLAT mean for you? Pin
    yuban at 4-May-07 14:30
    memberyuban4-May-07 14:30 

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

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

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