I have read that link thanks, its really good and about the only bit of code or explanation that I could find over the last few days

However I do have a few questions about it as the vast majority is to do with moving the scrollbars around and displaying them. The scroll bars don't actually scroll the image until part 7. The bit that must be doing the work is

sub process_scroll { ... if ( $bar == SB_VERT ) { $self->BM->Top( -$new_pos ); } else { # SB_HORZ $self->BM->Left( -$new_pos ); }
I looked up Top on the Win32::GUI::Reference::Options and its says

-top => NUMBER Specifies the top position (Y coordinate) for the window, in pixels. For Windows and DialogBoxes is absolute (screen position), while for controls is relative to the client area of their parent window.

So what I don't understand is how moving the top or left hand side of the Label control (that has the bitmap attached and is not actually anchored to a specific part of the main window or is it) causes the image to scroll ?????

If it isn't that bit of code then what is doing the work ?


In reply to Re^2: Win32 GUI scrolling controls within the main window by SteveR
in thread Win32 GUI scrolling controls within the main window by SteveR

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.