Results 1 to 3 of 3

Thread: Help with staretching image in status bar control...

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2000
    Location
    wrrj
    Posts
    26

    Post

    Hi, in one of my apps I have a status bar. What I need to do is load a bitmap from my HD into one of the panels, but the bitmap needs to be stretched, as normally it puts the image into the control but it is the actual size of the image. I need the image to be stretched inside the control. Please don't suggest using an image control as I need to use a status control. Understand???

    Thanks for your help

    David Richardson

  2. #2
    Addicted Member Razzle's Avatar
    Join Date
    Jan 2000
    Location
    Berlin, Germany
    Posts
    161

    Post

    Try StretchBlt!
    Public Declare Function StretchBlt Lib "gdi32" Alias "StretchBlt" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal dwRop As Long) As Long

    just get a handle to the bitmap and the statusbar and then you can resize you image any copy it to the statusbar


    ------------------
    Razzle
    ICQ#: 31429438

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jan 2000
    Location
    wrrj
    Posts
    26

    Post

    Thanks Razzle, I'll give it a try. I also have Dan Appleman's book on VB so this *should* shed some light on the function.

    Cheers mate :=) :} :]

    David Richardson

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