|
That sounds like a compelling offer. NOT !!!
Anyhow, back in the real world... you need to do your own project. Or pay someone to do it for you. If you get stuck on a specific thing, by all means, ask here ( assuming your project is C++/CLI, otherwise, ask in the right forum ), and we'd love to help. 'please send me the code I need to do my project', is just not going to happen.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Given the current state of the WPF development tools, is it too early to ask the question of whether we can develop a WPF application in C++/CLI ?
Will it be possible down the road, if not now, to access WPF from C++?
--------------------------------
"All that is necessary for the forces of evil to win in the world is for enough good men to do nothing" -- Edmund Burke
|
|
|
|
|
Richie308 wrote: Given the current state of the WPF development tools, is it too early to ask the question of whether we can develop a WPF application in C++/CLI ?
Will it be possible down the road, if not now, to access WPF from C++?
See http://blog.voidnish.com/?p=121[^]
I wrote that last year, but the content is still valid. Except that wherever I wrote Avalon, it should now be WPF
|
|
|
|
|
Thank you for your reply. I am seriously considering purchasing your new book about C++/CLI !
But can you say when it will be released? Amazon says it's not yet available.
--------------------------------
"All that is necessary for the forces of evil to win in the world is for enough good men to do nothing" -- Edmund Burke
|
|
|
|
|
Richie308 wrote: Thank you for your reply. I am seriously considering purchasing your new book about C++/CLI !
But can you say when it will be released? Amazon says it's not yet available.
Unfortunately, there have been some publishing delays (beyond my control). The e-book (final) should be out by the end of this month, but the printed book may be 6-7 weeks away.
|
|
|
|
|
Hello!
When writing a C++ application with several forms we would like to have a simple form of docking/snapping. How can this easily be done?
We're using C++ .Net 2.0.
We would like to have the same look and feel as the rest of the windows.
We would like to have something simple.
In the example below we would like to be able to have a new form d
that can be snapped to main form by shrinking the main form.
The form d shall also be able to be freely placed, above the main form.
When moving towards the edge it shall snap, it should not be able to move outside the main form.
There is no need to show arrows when moving and so on.
Thanks in advance,
Cecilia
---------------------
|main form |form a|
|.............|......|
|.............|------
|.............|form b|
|.............|......|
|.............|-------
|.............|form c|
|.............|......|
----------------------
|form d .............|
|....................|
----------------------
To:
---------------------
|f |main form |form a|
|o |..........|......|
|r |..........|------
|m |..........|form b|
|..|..........|......|
|d |..........|-------
|..|..........|form c|
|..|..........|......|
----------------------
|form d .............|
|....................|
----------------------
|
|
|
|
|
I've tried to retrieve some information about the Delegates registered to an Event.
GetInvocationList should return an Array of Delegates, which works fine in C# but somehow fails in C++ with ' C3918 usage requires 'sampleEvent' to be a data member.'
using namespace System;
ref class sample{
delegate void Event(array<System::String ^> ^args);
event Event^ sampleEvent;
void main(array<System::String ^> ^args) {
sampleEvent += gcnew Event(this, &sample::main);
for each (Delegate^ d in sampleEvent->GetInvocationList()){
Console::WriteLine( d->Method );
}
}
};
Is there a problem with GetInvocationList or is it just me being to stupid to spot an Error?
|
|
|
|
|
Unfortunately, in C++/CLI you cannot do that with a trivial event. You'd have to use a non-trivial event to achieve what you want.
|
|
|
|
|
I am trying to get system name & ipaddress through my application in which i am working on C.
So please forward me the proper solution as soon as possible.
Thanks.
|
|
|
|
|
Is suggest to post this question in VC++[^], which is appropriate one.
|
|
|
|
|
Can i not get ipaddress & system name in C? I know how to get this info in VC++,but that code is not running in C.The dll's are not compatible with C compiler. So please tell me how to use that code in C?
Thanks
|
|
|
|
|
pan_angel wrote: Can i not get ipaddress & system name in C? I know how to get this info in VC++,but that code is not running in C.The dll's are not compatible with C compiler. So please tell me how to use that code in C?
This forum is for C++/CLI questions. For general C and C++ questions, ask in the Visual C++ forum.
|
|
|
|
|
Hi,
I have a problem using directshow's filter graph and I could not find the answer on the internet. In my code I create a filter graph for rendering video files with audio components. I create the filters automatically using the RenderFile() function. I want to insert another filter just before the video renderer filter in order to process the video component of the file. Since i use the code for different kinds of video files I cannot find the renderer filter using its name.
For the files without audio, I enumerate the filters and I check for the output pins of the filters one by one. For the filter with no output pin I understand that its the video renderer filter, so i disconnect it and insert my OpenCV ProxyTrans filter. However, for the video files with audio I don't know how to find the video renderer file. In the method I mentioned above it is possible to find the audio renderer filter as well. Could you please help me on this? I would appreciate if you explain your solution with on of two lines of codes. Since I am a beginner in DirectShow it sometimes gets difficult for me to implement the suggestions of the expert people.
Thank you in advance.
Emrah
|
|
|
|
|
You're using C++/CLI, or are you in the wrong forum ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi, is there a way to call unmanaged C++ code from a managed C# application?
C# Application source code is available to my work-mate.(Managed)
C++ DLL source code is NOT available to my work-mate.(Unmanaged)
C#/(unmanaged)DLL application(s) often lockup.
Is there a way to prevent or mitigate this? A 'patch' if you will?
I've never seen the code my work mate is refering to...they've asked me to check on this problem they are having.
Thanks in advance.
|
|
|
|
|
Like2Byte wrote: is there a way to call unmanaged C++ code from a managed C# application?
http://pinvoke.net/[^]
led mike
|
|
|
|
|
Hey, thanks for this. I'll pass this along as well as use the tips from this page, too.
|
|
|
|
|
I wanted to add a property to my application that would be displayed as a list by the IDE. An example of one (that exists) would be the border style of a TextBox.
As is often the case, the example in the help are for trivial types, such as 'int'.
The best I've come up with (so far) is to use a StringCollection. This not only doesn't look the same, bringing up the collections editor, but supplies no way for the application to determine what the item was selected. For all practical purposes, this is useless.
The data type(s) of those that exist suggest they are either of a class, a structure, or an enumeration type, but I've frazzled myself trying to determine how to set-up/use any of these for the purpose of declaring any get_xxx and set_xxx methods.
It's clearly do-able, since MS is doing it, but, how?
Thanks;
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein
|
|
|
|
|
I wish to call multiple forms using the same object (Form1 called multiple times). I need to transfer specific data to a specific instance of Form1. How do I setup an array for Form1 and assign the data to the instance of the form.
Data[1] -> Form1[1]
Data[2] -> Form1[2]
Data[3] -> Form1[3]
etc.
Can anyone help me with this problem your help will be greatly appreciated, thanks in advance.
Michael
|
|
|
|
|
List<form1> forms = gcnew List<form1>()
something like that.
But it would be better to create a setup where there are mappings whereby each form has meaning beyond an index. Not naming them Form1 would also help make your code self documenting.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I would not know the name of the form until the time I would send it data. Is there a way I could name each form as each instance is created.
Michael
|
|
|
|
|
I have been using the debugger for a while now, but that did not help me much. I tested the code below:
double endTime = 0.0;
System::DateTime startTime = System::DateTime::Now;
int lower = -1000;
int upper = 1000;
int totalNumberOfCalculations = (upper-(lower-1))*(upper-(lower-1));
array<Calculation^>^ calculations = gcnew array<Calculation^>(totalNumberOfCalculations);
int i = lower;
int j = lower;
int arrayIndex = 0;
while(i <= upper)
{
while(j <= upper)
{
calculations[arrayIndex] = gcnew Calculation(i, Calculation::SUBTRACTION, j);
arrayIndex++;
j++;
}
j=lower;
i++;
}
System::TimeSpan elapsedTime = System::DateTime::Now - startTime;
endTime = elapsedTime.TotalSeconds;
double newEndTime = endTime;
First a question about the code and debugger: I put breakpoints at the start and end of this code. And then I put a watch on the variable endTime to se the time it took to run the code. The problem is that the variable had the value of 0.0000000000 until i added the final row of code "double newEndTime = endTime;". Why is that?? Do I have to use a variable's value to se the value??
I tested the above code and it took about 1.5 seconds to run on my computer. When I changed the lower and upper values to -5000 and 5000 the computer got hung up. And when I changed the lower and upper values to -10000 and 10000 I got this message:
"An unhandled exception of type 'System.OutOfMemoryException' occurred"
Does this mean that my computer can not generate all calculations between -10000 and 10000 (like: 10000 - 7893, -8512 - 2113, 9875 - 3213 and so on...)??
I would have hoped for my application to being able to generate calculations up to at least 100 000 and maybe up to 1 000 000.
If it is to any help for you, my computer specifications are:
AMD Athlon XP 2200+ 1.80 GHz
512 MB RAM
Under given circumstances; is my computer to slow or is there a bug in my code??
best regards, Andreas
|
|
|
|
|
Hi people, im trying to capture a single image from a USB webcam then use the data in a c++ program i am using, now Im led to believe i might need to use the WIA (Windows Image Aquisition) API to connect to the camera.
Im fairly inexperienced with COM stuff so my question is:
Im trying to run some of the examples i have seen on various sites on using the WIA API, when i access a COM object do i need to include any particular files or should my compiler know already what i am doing?!?
If anyone knows of a better way to get at the image data id LOVE to know
My environment is: Compiling straight C++ with g++ using Cygwin, on Windows XP (SP2). The camera is installed and works no problems in things like TWAIN (in PSP) and MSN messenger etc...
|
|
|
|
|
MrVanx wrote: when i access a COM object do i need to include any particular files
You'll need whatever header files that have define the interfaces you use. You may need link libraries as well. objbase.h/ole32.lib are the basics. The documentation for COM interfaces you
use should tell you which ones you need.
WIA is new to XP. As an alternative, and for compatibility with previous windows versions,
there's DirectShow (SDK is in the Platform SDK). There's also the old Video For Windows (VFW).
VFW has been replaced by DirectShow for the most part (in fact, legacy video device drivers for
VFW are supported in DirectShow).
|
|
|
|
|
Depending on which manufacturer of camera you are using, they may have an SDK to download. I've downloaded one from one of the major WEBCAM manufacturers and am using their SDK to develop personal stuff. The SDK is really old (like 2-3 years) but still works with most of their cameras. I forget who'se SDK it is, exactly. I know Logitech gives out their SDK; however, they want you to sign an NDA agreement and check out your company before doing so. Needless to say, I'm not using logitech cameras. YMMV
Will this solve your problem? I don't know.
|
|
|
|