|
Does anybody know where I can get a control like the picture control in Microsoft Word or PhotoDraw? I am in need of that type of image control that floats above another image (using layers), rotates freely and is resizable.
|
|
|
|
|
|
When I run
'Icon k = Icon.FromHandle(WorkingImage.GetHicon());
MemoryStream s = new MemoryStream();
k.Save(s);
int s_length = (int)s.Length;
FileStream WriteFileFinaly = new FileStream(FileName, FileMode.Create);
byte[] b = new byte[s_length];
s.Read(b, 0, s_length);
WriteFileFinaly.Write(b, 0, s_length);
WriteFileFinaly.Flush();
WriteFileFinaly.Close();'
(FileName is a location and file name)
The file created is not working as an icon, when i try to use it in a icon using program it gives an error.
What should I do?
|
|
|
|
|
ThinkingCapProductions_MrFluffy wrote: s.Read(b, 0, s_length);
What would you expect this line to do...?
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|
I am using 'b' "a byte[] array" to transfer the data from the MemoryStream 's' "which holds the Icon k" to a FileStream 'WriteFileFinaly'.
|
|
|
|
|
Then you might want to check the return value.
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|
I found the main problem but not the solution.
The byte[] 'b' size is alwase 446, and all of the numbers are 0.
Thanks for helping.
|
|
|
|
|
ThinkingCapProductions_MrFluffy wrote: I found the main problem but not the solution.
Might want to pay attention to what i'm trying to point out then.
Look, when you have problems like this, the first step is to break it down. You have a bunch of things that can go wrong, narrow down to the one that is going wrong. If the length of b is 446, then s_length is also 446, and there are 446 bytes stored in your MemoryStream (s ). If all bytes in b have the value 0 , then either the call to Read() is failing or s actually contains nothing but 0 s - so find out: the documentation for Read() specifies that the return value will be the number of bytes read - if that return value is 446... or anything greater than 0... you're successfully reading the contents of the stream into b , and the failure is prior to that. If it's 0, then the call to Read() is failing to read anything and you need to find out why (hint: Seek() back to the start of the stream before trying to read it).
BTW - why are you bothering to write to a MemoryStream rather than just writing directly to your FileStream ?
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|
I feel stupid.
'MemoryStream s = new MemoryStream();
k.Save(s);'
The streams position was at the end when I start to read from it, so all I did to fix it was put s.Position=0; to fix it.
Thanks a lot for all the help.
|
|
|
|
|
ThinkingCapProductions_MrFluffy wrote: The streams position was at the end when I start to read from it, so all I did to fix it was put s.Position=0; to fix it.
Ah, good.
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|
In C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include , there is ddraw.h ,
but where is the correspond .lib file?
There is no ddraw.lib in C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib .
system
|
|
|
|
|
|
system
|
|
|
|
|
Hello ...
i need help with the sample code given by windows SDK.
there is this AMCAP code they provide.
but there seems to be 5 errors of the same type...
C:\DX90SDK\Samples\C++\DirectShow\BaseClasses\ctutil.h(278): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
and the line 278 of ctutil.h displays;
private:
COARefTime (LONG);
operator = (LONG);
};
anyone could help me to solve the error.. or any guidance?
please.
thanks in advance.
-sue.
|
|
|
|
|
|
I have created an application in win32 in VS2005.net framework using direcx 9.0 sdk.The application is also using MFC in shared dll. But this application(created in release mode) is no running to another pc where VS2005.net framework is not available.It gives some dll missing.How can I solve this problem.I also provided all the supported dll.
|
|
|
|
|
You need to install vcredist_x86.exe[^] on the target machine. This will install the C-runtime library and the MFC libraries. If you have the VC service pack 1 installed, you should use this one[^] instead.
|
|
|
|
|
Thank you for your reply
I have already solved the problem.
|
|
|
|
|
I want to display different bitmaps those have different color keys.Suppose I have 3 bitmaps respectively black, red and gray color keys.I have to detect from the bitmap what is its color key.I think pixel 0,0 is its color key.How can I do this? I am new in Directx programming. I have already used CreateTextureFromFileEx function. In this function I have to fix the color key.But I don't know what is the actual color key.I have to take decision from the bitmap file.How is it possible? Please help me.
|
|
|
|
|
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
6. Neck
7. Head
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.
|
|
|
|
|
do your own homework you > on
and try reading the forum rules before you waste our time
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
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.
|
|
|
|
|
|
Mr. Adams,
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 also hope it helps .
Regards Sudyp
|
|
|
|