Thread: Scrollbar on Main Window

  1. #1
    Registered User
    Join Date
    Dec 2007
    Posts
    930

    Scrollbar on Main Window

    Hi,

    I want to some pictures(icons) on a window and I want to be able to scroll the window.
    I added the WS_VSCROLL style to the main window the one created in WinMain but apparently I cannot scroll the images.
    Is this normal? If it is what kind of window should I create on it to be able to add pictures on it and scroll the page?

    Thank you.
    Using Windows 10 with Code Blocks and MingW.

  2. #2
    Registered User
    Join Date
    Mar 2005
    Location
    Juneda
    Posts
    291
    As far as I know you have to check the scrollbar messages (WM_HSCROLL, WM_VSCROLL) to resetup the visible area over the whole 'real' area. I'm not sure if it can be done through the HDC modifying the views in some way; if not, you can solve that by creating your own view reference using some background scroll videogame technique.

    Niara

  3. #3
    Registered User
    Join Date
    Dec 2007
    Posts
    930
    Thank you Niara.
    I just created a ListView on it that way I can scroll it up and down.
    Using Windows 10 with Code Blocks and MingW.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Connecting Dialog window to main window
    By vopo in forum Windows Programming
    Replies: 1
    Last Post: 11-26-2007, 07:55 PM
  2. Window scrollbar
    By maxorator in forum Windows Programming
    Replies: 2
    Last Post: 10-07-2005, 12:31 PM
  3. what to do with the main window
    By stallion in forum Windows Programming
    Replies: 2
    Last Post: 01-28-2003, 08:58 PM
  4. how do i get the scrollbar on my output window?
    By Unregistered in forum C Programming
    Replies: 4
    Last Post: 03-14-2002, 01:39 PM
  5. Scrollbar In Dos Window
    By speve in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 12-17-2001, 08:12 PM