|
void setVendPtr(Vendor *c_VendPtr)
{
VendPtr = *c_VendPtr;
}
VendPtr // undeclare is a long, so you cannot assign it this way !
void setVendPtr(Vendor *c_VendPtr)
{
Vendor VendPtr;
VendPtr = *c_VendPtr;
}
|
|
|
|
|
Hello all.
I have decided to change the output directory of my managed c++ application and also the intermediate directory.
I had as output and intermediate directories de defaultvalues:
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)
which in fact were the same directory.
I have changed this right now to:
OutputDirectory="o:/$(ConfigurationName)"
IntermediateDirectory="o:/$(ConfigurationName)/Intermediate/$(ProjectName)
This changes the output of the project and the project is build correctly but when I try to execute the application I get a System.Resources.MissingManifestException.
If I don't modify the original value for the intermediate directory it works fine
Please can anyone explain something to me ???
Thanks in advace.
|
|
|
|
|
HI Fellow Aliens, try this one for size:This problem came from an international programmers contest, only one team made it....and finished in 4 hours! Well done New Zealand. Can you keep up with this problem?
Problem:
You are given an unknown number of composite blocks composed of 1 inch cubes. The one inch cubes are labeled with X,Y,Z coorinates. Facing each block, the x coordinate denotes the columns, the y coordinate the rows and the Z coordinate the depth. Each face of the one inch cubes is labeled with one of the color codes A,B,C,D,E or F. The face toward the vi ewer is A, then moving to the right side, back side, and the left side, the faces are labeled B,C and D. The top face is labeled E and the bottom F. In addition to the labeling, two of the one inch cubes are designated as "Start" and "stop"
The task is to determine if a path exists from the START to the STOP cube in each composite block. In order for a path to exist, you must be able to move from one internal cube to another via the sides with matching color sides.
Input: Input for each composite block consists of the X,Y,Z coordinates of the cubes, and the colors of the cube faces. The X,Y,Z coordinates for each cube represent the rear left lower point of the cubes. Assume a right hand coordinate system, is used and individual values for X,Y,Z will be less than 256. The colors are organized from left to right with the front face first, then the right, back, left, top, and bottom faces. The first two lines of data for each composite block represent the coordinates of the START and Stop cubes and the color codes of their faces. Negetive ones seperate the data sets for each composite block and there will be an unknown number of data sets in the file. Each composite block is to be treated as a seperate problem. The input file is named "maze.dat" and has the following appearence.
Items in braces are not part of the input:
{X Y Z FACES}
{START-->} 000ABCDEF
{STOP-->} 222CDEAFB
010FACDBE
020EDABCF and so forth.
OUTPUT:
Your output shoudl consist of a label for each block, and a statement indicating whether a path exists from the START to the STOP cubes. If more than one path exist, the paths should be presented from the shortest to longest.
PROGRAM LAUNGUGES ALLOWED: C++ or JAVA.
GOOD LUCK! BET YOU CAN'T BEAT THIS ONE!!
|
|
|
|
|
Hi to All,
I have a program in Managed VC++ and I want to add some Graphical Routine to
it. I have seen the C# code and its quite similar to Managed C++. All
functionalities in C# i could use in MVC++ except Managed DirectX. I always
get a compiler error, when all im just trying to do is create a device eg:
Microsoft::DirectX::Direct3D::Device* device;
...
PresentParameters* dxParams = new PresentParameters();
dxParams->SwapEffect = SwapEffect::Discard;
dxParams->Windowed = true;
device = new Device(0, DeviceType::Hardware, this, CreateFlags::SoftwareVertexProcessing, dxParams);
Can Managed DirectX SDK Summer 2004 be used in MVC++ 2003?
Please help me out on this coz im quite desperate...
Here's the error code:
error C3635:
'Microsoft.DirectX.PrivateImplementationDetails::IDirect3DDevice9': undefined
native type used in 'Microsoft::DirectX::Direct3D::Device'; imported native
types must be defined in the importing source code
did you forget to include a header file?
(NOTE: I've already included all the necessary assemblies)
cheers
--
Paul June A. Domag
nth geographics and geometrics
|
|
|
|
|
pauldomag wrote:
I have seen the C# code and its quite similar to Managed C++. All
functionalities in C# i could use in MVC++ except Managed DirectX.
Why on earth would you use MDC instead of just plain old DirectX ?
pauldomag wrote:
did you forget to include a header file?
(NOTE: I've already included all the necessary assemblies)
As the error is telling you, you apparently are missing some header files.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Hi Christian,
Im using Managed DirectX over the Umanaged one coz, as the name implies it is easier to manage...
All of the samples included in the Summer 2004 SDK are in C#...
But as you can see, the idea of the .NET Architecture is to be able to develope in cross languages so I think, Since Im using Managed C++ I should use Managed DirectX...
But the problem is Im getting some kind of error...
But viola! i've solved it... A person kind enough answered my question..
Just create a header file, with this content:
namespace Microsoft {
namespace DirectX {
namespace PrivateImplementationDetails {
__nogc struct IDirect3DDevice9 {};
}
}
}
And simply include it in your .cpp file..
cheers
Paul June A. Domag
nth geographics and geometrics
|
|
|
|
|
Sounds like a hack to me. Surely you're working around either a problem with the SDK, or a problem with your setup.
Either way, COM talks to .NET with no worries, there's no reason in the world to use Managed DX ( especially as managed means simply that you can fall into a false sense of security and slow your system to a crawl if you don't manage your own memory ).
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Well I guess its the problem of the SDK. coz some people I know also experienced this kind of problem (Thats why some of them shifted to C#)...
I personally agree with you on the performance issue. But im not actually developing a game or something that needs the extra speed of an unmanaged DirectX... thats why im using the managed one...
I guess COM do talk to .NET with no problems. But as I see it, when you access COM in your .NET app (C# or VB .NET) what the framework does is automatically create COM Wrappers on the objects so that you could access it. And thats an extra layer that your application needs to pass to be able to access COM. And I guess it would drag your app a little bit. Well, I read an article in microsoft that suggests that if you would like to create an app that is based on COM, better use Visual Studio 6 instead of VS .NET
Thank you very much Christian, for your comments and great insights...
cheers
Paul June A. Domag
nth geographics and geometrics
|
|
|
|
|
pauldomag wrote:
And thats an extra layer that your application needs to pass to be able to access COM. And I guess it would drag your app a little bit.
Surely you realise that layer has to exist somewhere ? I doubt they rewrote DX entirely for managed use. I hope they didn't, it would be very bad practice. Unless a sub COM layer already existed, I suppose.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Greetings Christian,
Yes your right Microsoft didn't rewrite the DX for managed use. Instead they added a set of assemblies to be able to comply with the .NET Framework (thus came Managed DirectX). The classic style DX (unmanaged) is still there... By the way, you could also mix both worlds (eg unmanaged DX in managed) or just like my friend vas, he uses unmanaged DX and everything else is in .NET (forms..etc) Well i guess you could get the best of both worlds...
cheers
Paul June A. Domag
nth geographics and geometrics
|
|
|
|
|
Hey everyone. I just need to know how to make a cube bounce off the borders of the screen in DirectX 9. I'm currently reading the "Introduction to 3D Game Programming with DirectX 9.0" book - but I can't figure out how to make a cube bounce around the screen. I would like to eventually make it so that a cube, torus, and teapot bounce off the borders of the screen in different directions and speeds. Can anyone help me and provide some code with explanation? Thanks!
<3, Guissella
motobmxdiva@yahoo.com
|
|
|
|
|
Suppose, I am selecting an item from a list box an I would like to change the items in another list box (ListBox2) based on the selection in ListBox1
For Example- in a list Box1 (Title Country) , if I select India, I would Like to change the contents of List Box2 (Title-Cities), I will get the cities of India in List Box 2
|
|
|
|
|
I am trying to teach myself threading from a book, but the book I have isn't helping me very much.
My main thread sends off another thread. The new thread could at any given moment be either running or suspended.
I want to be able to abort that thread and creat it again so that it starts at the begining of its process.
The problem I am having is that depending upon whatever random moment I click the button that does this; I sometimes get either a ThreadAbortException or a ThreadStateException. For some reason my try--catch isn't catching them.
I don't suppose anyone would be able to give me a little example of how to work with threads in this way?????
Thanks,
Jody Blau
|
|
|
|
|
Try this:
Catch ex As ThreadAbortException
Trace.WriteLine("READ THREAD ABORT EXCEPTION!")
'Allow the thread to continue aborting:
Thread.ResetAbort()
david
|
|
|
|
|
I'm sure this is simple, i'm just not seeing it.
I'm not having any luck trying to figure out how to have my listbox autoscroll to the last item in the list when a new item is added.
|
|
|
|
|
Hi,
if U are Using MFC, check setHotItem(int iIndx)
by
baijumax
|
|
|
|
|
I am using Visual Studio.net 2003; and I don't see anything that looks like setHotItem.
???
|
|
|
|
|
Hai,
u can simply solve the problem by selecting the last item.
ie
this->listBox1->SelectedIndex=this->listBox1->Items->Count-1;;
ANish
|
|
|
|
|
|
I've added a new windows form to my project and I have no idea how to display the form. I have books with examples, but they only work if the form is the main form of the app. This is a mixed-mode app and I'm just doing a test to get familiar with windows forms. I have #included the header file for the form and in the menu's event handler, I have done this:
#pragma push_macro("new")
#undef new
CTestForm* dlg = new CTestForm();
dlg->ShowDialog();
#pragma pop_macro("new")
Can anyone help me out here? Thanks in advance
[insert witty comment here]
bdiamond
|
|
|
|
|
Hi,
The Following Links May Help You.
1) http://www.codeproject.com/useritems/Windows_Forms_in_MC__.asp
2)
http://www.developer.com/net/net/article.php/1378751
3)http://www.codeguru.com/columns/Kate/article.php/c6585/
|
|
|
|
|
thanks!!
[insert witty comment here]
bdiamond
|
|
|
|
|
..not really sure why this is in the Managed C++ forum,...but,...
I have been reading Don Box's book: "Essential COM". He has a code section in the back where he provides a server/client Chat application. It's all C++, and is written as an example of how to create a COM server/client app. It may help you (or, maybe not).
http://www.awprofessional.com/content/images/0201634465/sourcecode/COMCHAT.zip[^]
This is probably like 'cheating'.
|
|
|
|
|
thanx alot for your concern!
my main problem is not the code, its trying to arrange a graphical interface for my "chat program" with borland.
i dont know how to do that and i dont know if borland 5.01 enables me to.
well, thanx alot once again, i appreciate it
|
|
|
|
|
From what I've read, compiler implementations are proprietary, and can be different from vendor to vendor. This is the forum for the Microsoft Visual Studio .NET IDE. Before I used the .NET IDE, I tried messing around with the Borland compiler, and, as I recall, it works completely differently from .NET.
Most importantly, the .NET runtime environment depends on the CLR (Common Language Runtime) which is a proprietary implementation of the CLI (Common Language Infrastructure). As far as I know, the CLR is the only implementation of the CLI on Earth, and so, any code that is specific to .NET would NOT work on the Borland compiler.
|
|
|
|