What you are trying to do is simple, but DirectX does not have an appropiate function for you to call. The simplest approach would be to just read from memory. Have a look at the MSDN GDI Bitmap Reference[^]
The concept is to load the bitmap into memory (this should exist as one continuous block of memory), by creating a DIB Section (see, Create DIB Section[^]), or similar technique. Then you locate the the pointer value for the actual bitmap bits (this is provided in the header structure), and read the appropiate value.
If all of this is new territory for you, you should probably begin with, Bitmap Creation[^], or, Device Independent Bitmaps[^]
This is jia.I want to have code in C++ of a human like robot.
Features of the Robot character
Your 3D robot character should have all of the following features and body parts:
1. Torso: Should have at least two parts torso. Upper torso and lower torso.
2. Left and Right leg: Each leg should have at least two parts, upper leg (above knee) and lower leg.
3. Left and Right Arm: Each arm should have at least two parts, upper (above elbow) and lower arm
4. Left and Right Feet
5. Left and Right Hand
To make your Robot character look good, you should include the following features for your Robot character:
1. Each body part should have its own OpenGL lighting material property.
2. Each body part should have its own texture.
Features of the program
Your program must contain all of the following features:
1. The scene should also include a floor and a visualized 3D coordinate system.
2. You should be able to use the mouse to change the view angle.
I could find topic on applying skins in applications developed in .Net Framework 3.0 and higher using the WPF. But i need to apply it in .Net Framework 2.0 using C#. Can anyone give me hint or some sort of sample code on how to apply skin.
Ur help will be really appreciated.
Thanx in advance.
First of all thank you for the quick reply. I will definitely go though ur articles and try to learn as much as I can. I am hopeful that they are going to be of great help for me in trying to skin desktop application.
I went through the article in the link you posted in reply to my query. The article is great. May be it will be helpful for me in the future.
I could only see things about WPF and its uses in data visualization.
Currently I need to skin application in .Net Framework 2.0. So, I guess, I need to keep on looking further on other articles to get some help on it.
Thanks for any tips, hints or anything I could have forgotten.
Your best bet for fonts is to build a texture font. Bitmap fonts exchange memory with real-memory as needed, often at higher frame rates, thus increasing memory footprint, and preventing higher frame rates -- ironically. Your 3D card is designed for texture mapping, not for bit-blitting.
Edit: I've only just spotted that you cross posted to the Mobile forum, so "smart" means "on a smartphone" instead of "very pretty". I have no idea if the article I pointed you works on whatever version of windows mobile you are using, but it should be a good starting point. The 2nd solution of using an AVI and Animation control looks more attractive, as it will use preexisting code, and be better for your RAM. - Iain.
I use picture box controler for that
That's where you're going wrong. The picture control is purely showing a picture. You have a few choices. You could write a timer routine, and set the picture control to show successive frames of your GIF - probably not easy, as I remember the format...
Of you could use CAnimateCtrl which is a MFC wrapper around the Animation Common Control. But this will only work with AVIs.
Or you could do what I did.
"Hmm, a control that shows gif files...".
So go to your favourite programmer's website that has articles, and type in "gif control" into the search box, and look at the second entry. (Hint: It's an article called "GIF Animation Control"). It has good reviews, looks well written and simple to follow.
I have a series of incoming byte arrays of unknown size (range can be anywhere from 1667 to 51200, but once the size is set it should stay steady for long periods but may change). The value contained in each element is a shade of grey. Currently the bitmap is in a fixed size PictureBox with the result the bitmap has a max height of 900. The incoming array is decimated to 900 for full display. The whole (or as much as is left after decimating) needs to be visible, there is no zooming. It is a waterfall display so once the bitmap width is full, the incoming array causes the oldest to "disappear". Is there a way to, something other than a bitmap or picture box perhaps, to reduce/eliminate the decimation with out having to increase the size taken up on the screen?
My hope is (was?) there is some other method other than a bitmap I can use to avoid or reduce the decimation. Side note, the bitmap appears to be hard coded to a max of 32K.
Yes, if there are more pixels than the bitmap will hold there will be some kind of decimation.
this thing looks like it was written by an epileptic ferret