Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Client area vs window size...

SephirothSephiroth Fayetteville, NC, USAPosts: 1,035Member
How can I create a client area that is larger than my window? I have a child window that takes up a small portion of my parent window, and it is created with scrollbars, but I cannot figure out how to make the client area larger. Say the window is 320x240, but I need the client area to be 800x600, how could I accomplish this?

-[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]

Comments

  • AsmGuru62AsmGuru62 Posts: 6,519Member
    : How can I create a client area that is larger than my window? I have a child window that takes up a small portion of my parent window, and it is created with scrollbars, but I cannot figure out how to make the client area larger. Say the window is 320x240, but I need the client area to be 800x600, how could I accomplish this?
    : -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]
    :

    If you look at 'OnWmPaint()' in SCROLLERS.ZIP that I have sent you recently you will see this call:

    SetViewportOrgEx (hDC,
    -GetScrollPos (hWnd, SB_HORZ),
    -GetScrollPos (hWnd, SB_VERT),
    NULL);

    That is what makes the client area a viewport into a larger portion of window...




  • SephirothSephiroth Fayetteville, NC, USAPosts: 1,035Member
    You know, I didn't have any clue as to what that did and thus hadn't messed with it, lol. Thanks Guru, I'll check out the source and my help files.


    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]


Sign In or Register to comment.