No scrollbar for Listbox using WinAPI
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: No scrollbar for Listbox using WinAPI

Hybrid View

  1. #1
    Join Date
    Nov 2000
    Posts
    13

    No scrollbar for Listbox using WinAPI

    Can someone please help me out. The scrollbars are missing when I create a listbox using either CreateWindow or CreateWindowEx.
    Here is my code below..

    hSiteList = CreateWindow("listbox",NULL,WS_CHILD | WS_VISIBLE | WS_BORDER | LBS_HASSTRINGS | LBS_STANDARD| WS_HSCROLL | WS_VSCROLL, 320, 85, 130, 125, hwnd, (HMENU)IDC_SITELIST, hInst, NULL);

    OR

    hSiteList = CreateWindowEx(NULL,"LISTBOX", NULL, WS_CHILD | WS_VISIBLE | WS_BORDER | WS_HSCROLL | WS_VSCROLL | LBS_STANDARD, 320, 85, 130, 125, hwnd, (HMENU)IDC_SITELIST, hInst,NULL);

    Thanks!


  2. #2
    Join Date
    Aug 2000
    Location
    West Virginia
    Posts
    7,646

    Re: No scrollbar for Listbox using WinAPI

    I am not sure about the vertical scroll bars, but for the horizontal
    scroll bars I think you need to look at the LB_SETHORIZONTALEXTENT
    message.




  3. #3
    Join Date
    Sep 2013
    Posts
    2

    Re: No scrollbar for Listbox using WinAPI

    u should add more numbers of items in the list box then u could see the scroll bars

  4. #4
    Join Date
    Sep 2013
    Posts
    2

    Re: No scrollbar for Listbox using WinAPI

    u should add more numbers of items in the list box then u could see the scroll bars automatically

  5. #5
    Join Date
    Jan 2002
    Location
    Houston, TX
    Posts
    1,421

    Re: No scrollbar for Listbox using WinAPI

    The OP has probably solved this within the past 11-1/2 years!
    Be sure to rate those who help!
    -------------------------------------------------------------
    Karl - WK5M
    PP-ASEL-IA (N43CS)
    PGP Key: 0xDB02E193
    PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center