Results 1 to 5 of 5

Thread: Bitblit

  1. #1

    Thread Starter
    Fanatic Member SeaHag's Avatar
    Join Date
    Jul 2001
    Location
    Lake Huron
    Posts
    901

    Bitblit

    Hi.
    Questions concerning pictures.

    What are the types of containers are uses as a source
    to blit from (the obvious one is a picture box) ?

    My problem is I want to make a sort of tile map.
    its not really a map because there are no set objects

    What i want to do is download pictures from the web
    I want a 4pictures x 4pictures (pictures are 200x200 pix)
    Ya know.. kinda construct a bigger picture.


    And i want to buffer another row around those 4x4. so i can scroll.


    How am i going to load my pics?

    I can download and save do disk. But what from here.
    Do i load all the pics into seperate picture boxes then blit them?

    Or is there a way of assembling them befor i blit them

    i have run across so many eg. osme to simple.. some way to complicated..

    I have managed to get one of the eg working.. but i cannot figure where or what they do with the bitmay arrays.. ??

    I will attach it.


    Seahag
    Attached Files Attached Files

  2. #2
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    Load 'em by code into the memory directly

    Tutorial (Point 3.3)

  3. #3

    Thread Starter
    Fanatic Member SeaHag's Avatar
    Join Date
    Jul 2001
    Location
    Lake Huron
    Posts
    901
    Thanks for your reply.

    How many can i load into memory>?
    I am thinking as many as i want.. ?
    If so, how do i keep trak of them .. ?



    Nifty

    Seahag

  4. #4
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    As many as your windows allows :-)

    Well basically the function I show in the tutorial returns a 'pointer' to the DC so you'd use it like this:

    VB Code:
    1. Dim PicW as Long
    2. Dim PicH as Long
    3. Dim PicDC as Long
    4.  
    5. 'Load picture
    6. PicDC = LoadDC("c:\test.bmp", PicW, PicH)
    7.  
    8. 'Show size
    9. Msgbox "The picture is " & PicW & " x " & PicH & " pixels big."
    10.  
    11. 'Use picture
    12. BitBlt Me.hDC, 0, 0, PicW, PicH, PicDC, 0, 0, vbSrcCopy

    See? Of course you can use PicDC(10) or any other array to store multiple DCs. If you need to store the size of each picture too, use a Type...

  5. #5

    Thread Starter
    Fanatic Member SeaHag's Avatar
    Join Date
    Jul 2001
    Location
    Lake Huron
    Posts
    901
    I see..
    Thanks for your help.
    Its all so clear now.

    Seahag

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