Disable Horizontal scroll bar

Discussion in 'MFC' started by Starter, Sep 13, 2010.

  1. Starter

    Starter New Member

    Joined:
    Aug 31, 2010
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    Hi i have been trying this for long time but am not getting any result , my problem is that i want to remove the horizontal scroll bar , i have tried 'EnableScrollBar' and 'SetWindowLong' but of no use.

    Any help would be appreciated
    Thanking you in advance
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Can you explain from where are you trying to remove it?
     
  3. Starter

    Starter New Member

    Joined:
    Aug 31, 2010
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    Hi ,
    I am building an application similar to 'Notepad' , presently i am doing the 'WordWrap'
    part for which i have to remove or disable the horizontal scroll bar.

    Any help would be appreciated
    Thanking you in advance
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Set Auto HScroll and Auto VScroll from the Styles Tab in Edit Properties. Or, if you create the Edit Control from code at run time, you need to set the styles ES_AUTOHSCROLL, and ES_AUTOVSCROLL.
     
  5. Starter

    Starter New Member

    Joined:
    Aug 31, 2010
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    Thankyou for the reply, yes i have included both ES_AUTOHSCROLL and ES_AUTOVSCROLL but the actual problem is that when i check the 'WordWrap' from the format menu the 'HorizontalScrollbar' should be disabled only then the wordwrap would work . I have tried EnableScrollBar and been googling for long time but of no use . presently i am thinking of saving all the data from the edit control into a buffer and creating the edit control without 'ES_AUTOHSCROLL' . But still if any one knows of any other method pls let me know.

    Any help would be appreciated
    Thankingyou in advance
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice