Results 1 to 6 of 6

Thread: Bitblt & Stretchblt

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    12
    I have recently discovered Bitblt and Stretchblt. They are great, a little slow, but great. I was wondering, how can you blt a picture that is in another file stored on the HD? Also, would using these two APIs be the best choice, or is there a better choice?
    John
    Building a better gaming world through VB.

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    For resizing pictures i suggest you use paintpicture method instead, it's faster and doesn't screw up the colors as stretchblt might do, although there are some flags you can set using setstretchbltmode but paintpicture is still faster.
    No you can't blit to a file on a harddrive, you need to load the file into a bitmap using loadpicture and then attach it to DC or use a picturebox, then you can blit to it, and save it with savepicute
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    12
    With your suggestion, can you make it so that the bitmap isn't visible to the person using the program?
    Building a better gaming world through VB.

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    If you want to use the picturebox, you could set its visible property to false and autoredraw to true, theres a way to do it with apis too, then you don't need a picturebox either
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  5. #5

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    12
    How can you do it solely with API's?
    Building a better gaming world through VB.

  6. #6
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    YEs, you can go look at this thread:
    http://forums.vb-world.net/showthrea...threadid=37669
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

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