Results 1 to 7 of 7

Thread: Scroll Bar

  1. #1

    Thread Starter
    Frenzied Member Technocrat's Avatar
    Join Date
    Jan 2000
    Location
    I live in the 1s and 0s of everyones data streams
    Posts
    1,024
    I need some help and code with scroll bars using CreateWindowEX. How do I get them to appear? Is there a message I need to catch? How do I make them scroll?

    Thanks
    MSVS 6, .NET & .NET 2003 Pro
    I HATE MSDN with .NET & .NET 2003!!!

    Check out my sites:
    http://www.filthyhands.com
    http://www.techno-coding.com


  2. #2
    Guest
    Make them appear?? Just use the ShowWindow function, or when creating them, set their style to WS_VISIBLE.

  3. #3

    Thread Starter
    Frenzied Member Technocrat's Avatar
    Join Date
    Jan 2000
    Location
    I live in the 1s and 0s of everyones data streams
    Posts
    1,024
    They dont.

    Code:
    m_hWnd_MsgList = CreateWindowEx(WS_EX_NOPARENTNOTIFY, "SysListView32", NULL, WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_BORDER | LVS_REPORT| WS_VSCROLL | WS_HSCROLL | WS_CLIPSIBLINGS , 0, 0, 300, 100,hWnd, NULL, m_hInst, NULL);
    		
    ListView_SetExtendedListViewStyle(m_hWnd_MsgList, LVS_EX_FULLROWSELECT);
    
    //Shows The Window The ListView Is In
    ShowWindow(hWnd,SW_SHOWNORMAL);
    UpdateWindow(hWnd);
    
    ShowWindow(m_hWnd_MsgList,SW_SHOWNORMAL);
    UpdateWindow(m_hWnd_MsgList);
    MSVS 6, .NET & .NET 2003 Pro
    I HATE MSDN with .NET & .NET 2003!!!

    Check out my sites:
    http://www.filthyhands.com
    http://www.techno-coding.com


  4. #4
    Guest
    Change the class name to "ScrollBar"

  5. #5

    Thread Starter
    Frenzied Member Technocrat's Avatar
    Join Date
    Jan 2000
    Location
    I live in the 1s and 0s of everyones data streams
    Posts
    1,024
    Do you mean add another CreateWindowEX for the scroll bars? Because if I rename it then I would lose my ListView.
    MSVS 6, .NET & .NET 2003 Pro
    I HATE MSDN with .NET & .NET 2003!!!

    Check out my sites:
    http://www.filthyhands.com
    http://www.techno-coding.com


  6. #6
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Well, when I create a listview I use:

    Code:
    	m_hWndListCtrl = CreateWindowEx(WS_EX_CLIENTEDGE, WC_LISTVIEW, NULL, WS_CHILD|WS_VISIBLE|LVS_SHAREIMAGELISTS|WS_TABSTOP|LVS_REPORT|LVS_AUTOARRANGE, 0, 0, 0, 0, m_hWnd, (HMENU)ID_LISTVIEW, g_hInstance, NULL);
    In conjunction with InitCommonControlsEx and the needed libraries and includes (something like comctrl.h and .lib)

    the listview displays the scrollbars automaticly when there has to be one
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  7. #7

    Thread Starter
    Frenzied Member Technocrat's Avatar
    Join Date
    Jan 2000
    Location
    I live in the 1s and 0s of everyones data streams
    Posts
    1,024
    There was, after many hours of screaming ***, I figured out that the listview view area was to big and the scroll bars were out side the window.

    Thanks for all the help
    MSVS 6, .NET & .NET 2003 Pro
    I HATE MSDN with .NET & .NET 2003!!!

    Check out my sites:
    http://www.filthyhands.com
    http://www.techno-coding.com


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width