|
One other thing I noticed in msdn when I was reading about directshow was that it only supports video capture from a hardware device like tv tuner cards or cameras...
the video i want to capture will be running on a C++ application on my computer screen. in fact, i want to incorporate the video capture, edit, and playback features within that same application so it can be more integrated.
if this is the case, can directshow do what i want? if not, what are the alternatives??
--
dg
|
|
|
|
|
Hello,
Possibly a stupid question.
Will C++ code run on linux? or does it target the .NET?
If the answer to the first question is no then what would be the best
genral purpose cross platform language to learn ?
Thanks
|
|
|
|
|
C++ can run on linux, but all the MFC and .NET stuff doesn't. Check out Mono, it's a project that will allow .net stuff to run on linux when written in C#.
|
|
|
|
|
Ylno wrote: Will C++ code run on linux?
This question makes no sense. Once (c++) code is compiled, the language used is no longer relevant. It's "machine language" at that point.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Sorry if the question makes no sense. That was obviously my fault, i won't be doing that again. Next time i'll be in a position to talk down to a newbie on this subject.
So next stupid question: if the language is no longer relevant then is the
machine language of linux compatible with windows?
I wouldn't have thought so but you can suprise me.
Basically i'm after a language that i'll be able to use cross-platform ...
|
|
|
|
|
Ylno wrote: ...is the
machine language of linux compatible with windows?
No, they use different instruction sets. High-level code can be ported from one platform to the other, though. You'll just need a compiler on each to create the machine code.
See here for more.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thanks Dave,
You've cleared things up.
|
|
|
|
|
Ylno wrote: is the
machine language of linux compatible with windows?
Linux (or Windows) doesn't have a machine language, machine language is a feature of the processor chip and it's independent of any OS you may be running.
Ylno wrote: Basically i'm after a language that i'll be able to use cross-platform
C, C++, Java, Python, Ruby, Perl, ...
|
|
|
|
|
good answer!
|
|
|
|
|
Hello, I'm having a bit of trouble and was hoping you guys would be able to help me out. Right now I have a function that produces a 2 arrays with number used from graphing. In the OnPaint part for the dialog box I simply used the MoveTo and LineTo to graph. In order for both functions to get at those arrays I put at the top of the code(like how I would with a global varible in C). But now that program will crash when I run that function twice because of the painting. Any ideas of how to solve this, am I declaring the arrays in the wrong place?
Thanks
|
|
|
|
|
Are the arrays initialized at the time the first WM_PAINT message is received?
What does the code look like where the crash occurs?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
No they are initilized after the WM_PAINT. The code crashes when I access the arrays for the second time to paint, If I comment out the paint code the program will just fine. The code looks like this where is crashes, where x_prime2 and Ey_x2 are the arrays
for(int i=0; i<=999; i++){
x = (30+scale2*x_prime2[i]);
y = (scale1*Ey_x2[i].Real());
if(i == 0){
dc.MoveTo(int(x+min_1*(-1)*scale2), int(y*(-1)+640));
}
else{
dc.LineTo(int(x+min_1*(-1)*scale2), int(y*(-1)+640));
}
}
And I initilize them like this
#include "stdafx.h"
#include <math.h>
#include "complex.h"
#include <complex>
int Nglobal;
int *layerglobal = new int [100];
double *thickglobal = new double [100];
Complex *Ey_z_C2=new Complex [1000];
Complex *Ey_z_L2=new Complex [1000];
Complex *Ey_x2= new Complex [1000];
Complex *z_prime2=new Complex [1000];
double *x_prime2=new double [1000];
|
|
|
|
|
I can't see anything off hand....are you getting a floating point exception?
How is it crashing?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Also, you ARE putting valid values into the arrays before calculations are done on the values,
right?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Yes the values that are being put in are valid, I do not know what a floating point exception is though. The program runs just fine in debug, which is driving me crazy I just can't get the release version to work. Do you think it could have something to do with the compiler options? Is there a way I can paint directly from the function instead of using the OnPaint function?
Thank you very much!
|
|
|
|
|
You can have debug info on your release build and run it in the debugger.
That's still the easiest and best way to find the offending line of code
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I have found my problem, the array was being over written I dunno how, The array was set to be N+1, and then I did a loop from (i=0; i
|
|
|
|
|
Hi,
I have a .DLL I compiled (in C# in .NET), and added as a reference to a Visual C++ project in .NET. Now I need to be able to access its members somehow. Both library and its namespace are called HyTest, however HyTest:: or HyTest. yeild nothing. Is there a specific way to access members of a DLL (written in C#) compiled in .NET?
wbr,
Victor
|
|
|
|
|
*bump*
sorry if this comes across inconciderate =\ I am on a pretty tight timeframe so any help would be much appriciated
|
|
|
|
|
It's a well known bug: The Month Calendar returns a false Date...
Does somebody know a bugfix or a workaround for this problem? (I'm sorry if a thread already exists but the search found nothing that looked good...)
|
|
|
|
|
What's the bug? Have a link?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Just try this little code:
void CTodolisteDlg::OnSelectkalender(NMHDR* pNMHDR, LRESULT* pResult){
UpdateData(true);
m_tag = m_datetime.Format( "%A, %B %d, %Y" );
UpdateData(false);
}
(m_tag is the membervariable (string) of a textbox and m_datetime is the membervariable (CTime) of the Month Calendar)
In your textbox will be written an other date then you have selected...
-- modified at 14:23 Thursday 21st June, 2007
|
|
|
|
|
It works for me but I'm on VS 2003 (MFC 7.1). I suppose the bug was/is in CTime somewhere?
For a workaround, maybe use the actual SYSTEMTIME of the NMSELCHANGE struct passed in the
notification and use a "better" date/time class...
void CTodolisteDlg::OnSelectkalender(NMHDR* pNMHDR, LRESULT* pResult)
{
NMSELCHANGE *pNMSelChange = (NMSELCHANGE *)pNMHDR;
COleDateTime OleDateTime(pNMSelChange->stSelStart);
<code>
m_tag = OleDateTime.Format( "%A, %B %d, %Y" );
UpdateData(false);
}
-- modified at 14:47 Thursday 21st June, 2007
*edit* Ooops
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Sorry, i'm a "noob" in MFC...
I don't understand how to use this example above, but when I compile it simply it doesn't works cause now is m_datetime not changed...
that means that the selected date is fix set to the inital-value of m_datetime...
Are there alternative calendars that works well for VC++?
|
|
|
|
|
See the fixed code - I messed it up and left your variable in there.
Sorry about that
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|