Solved

Sprite Animation

Posted on 1997-03-25
4
532 Views
Last Modified: 2008-03-04
There are 3 parts to this question which each relate to this sprite query.

Initially, I would like to refer to the use of the picture box as a way to create a sprite through the API call BItBlt. I would like to know if it possible to store the BITMAP as some kind of data structure without having to actually have it loaded on the screen.

The second question relates to the ability to access the icons on the desktop, through an API call, or perhaps through .INI.

The third question which does not relate exactly to sprite, but to the use of the Joystick API functions and a way access a joystick through development in VB 32bit and not just VB 16 bit. The reason as to why it works only in 16 bit I am aware of so if this is your answer, don't bother, I need a solution to being able to develop with 32 bit and accessing the joystick


0
Comment
Question by:even032597
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 1

Expert Comment

by:andyb013197
ID: 1424707
Yes it is possible to store the bitmap as a 'data structure'. Thats how its stored internally anyway when you see the term 'handle to a bitmap' HBITMAP in the api documentation. However I generally tend to use stretchdibits more than bitblt and pass the api the address of the bitmap bits (and also header) instead. This can all be done through VB with some work.

More than that I cant say, it depends on what you want to do..

You may get more response from others by upping your points though!


0
 

Author Comment

by:even032597
ID: 1424708
Any examples would be greatly appreciated.
0
 

Accepted Solution

by:
timbo032697 earned 50 total points
ID: 1424709
I'm trying to do exactly what you asked. What you need to do is set up a memory device context using the CreateCompatibleDC API function. Then BitBlt the bitmap into the memory DC. That's the easy part. The hard part is writing the routine that reads a bitmap file. You'll need to use the CreateDIBitmap function and the BITMAPINFOHEADER & BITMAPINFO structures. It's really too complicated to discuss here. Check out my animation tutorial at http://www.geocities.com/SiliconValley/Park/3269 or email me.
0
 

Expert Comment

by:timbo032697
ID: 1424710
I figured out how to do the first part of your question. Depending on what you're trying to accomplish, I have three different solutions. I believe it's worth more than fifty points, though. Whaddaya think?
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question