Results 1 to 4 of 4

Thread: BitBlt: tile dragging challenge

  1. #1

    Thread Starter
    PowerPoster rjlohan's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    3,205

    BitBlt: tile dragging challenge

    Hi all,

    I am trying to develop an app that will ease repetitive drawing tasks (in particular drawing layouts for train tracks).

    There are only so many possible layouts, so I am trying to do a prog where the user can just drag a bunch of tiles around to make their pic.

    My problem: I don't want to draw a tile for every possible combination of tracks, like when two tracks cross over:

    |
    _|____
    |
    |

    I only want to draw a set of tiles which are standard, like a left-to-right track, an up-down track etc, and let the user layer these as they choose.

    I have experimented with the BitBlt thingy, but I am having problems in that I don't know how to reference the tile being dragged when the DragDrop event is raised in the main picture box.

    The DragDrop event passes me the Source, but when using BitBlt and masked pictures, where the mask is attached to the tile, I do not really want my users to see the half of the pic which is the mask.

    But the drag drop only passes the source of the tile, not the source of the mask if I split them up?

    Any suggestions?

    -----------------------------------------
    -RJ
    [email protected]
    -----------------------------------------

  2. #2
    Alain
    Guest
    I'm not sure I fully understand but if I do, why don't you use a dummy tile to drag and on release of the mouse, do your bitblt using the official tile with the mask?

  3. #3

    Thread Starter
    PowerPoster rjlohan's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    3,205
    The prob I'm having is addressing 'other' tiles from a DragDrop event. This event automatically retrieves the source, but I can't work out how to reference a different tile at that point...
    (There are many tiles, so a list of all the names is unreasonable...)


    -----------------------------------------
    -RJ
    [email protected]
    -----------------------------------------

  4. #4

    Thread Starter
    PowerPoster rjlohan's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    3,205
    It's OK now, I got it sorted.

    That'll learn me not to program for 8 hours straight and expect things to work...

    -----------------------------------------
    -RJ
    [email protected]
    -----------------------------------------

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