|
Nah, didn't work either. The push_back seems broken...
Cheers,
Fredrik
<right>Sonork ID: 100.11430:PhatBoy
"Felix qui potuit rerum cognoscere causas."
|
|
|
|
|
It's this line:
Fredrik Skoog wrote:
TFileList FileList(nFiles);
This creates nFiles items initially empty and I guess NULL pointers. That's why you had 8 items, because 4 have already been created.
You shoud use:
TFileList FileList;
FileList.reserve (nFiles);
reserve allocates enough space, but does not create any items.
Best regards,
Alexandru Savescu
|
|
|
|
|
Yep, that's it. Thanks a million!
I think I'll have to hit the books now
Cheers,
Fredrik
<right>Sonork ID: 100.11430:PhatBoy
"Felix qui potuit rerum cognoscere causas."
|
|
|
|
|
Hi...
I've a class MyClass which contain a member CFile m_MyFile.
I want to pass this file (open) to another class CMyOtherFile derived from CFile...
I tested while passing the handle of m_MyFile but that doesn't work (and it's not recommanded)...
Anybody can help me???
Thanks...
Hello World!!!
from Raphaël
|
|
|
|
|
If I understand you correctly, I think you should rethink your design strategy.
I think it might be better to pass the file name if possible.
Cheers,
Fredrik
<right>Sonork ID: 100.11430:PhatBoy
"Felix qui potuit rerum cognoscere causas."
|
|
|
|
|
Of course... I've found another solution... A better solution...
Thanks...
Hello World!!!
from Raphaël
|
|
|
|
|
Hi,
I have an MDI CFormView that makes itself the exact size of the outer frame, and resizes with it. However, you can still grab the right bottom edge and size the child viewform independently. I want this to not happen. The user should not be able to resize just the child form, only the outer frame with which the child form resizes faithfully as it is currently written.
Thanks,
ns
|
|
|
|
|
I think
cs.style &= ~WS_THICKFRAME;
in the child precreate is doing what I want. Thanks!
ns
|
|
|
|
|
Filter need some data before playing(about 170KB). Can the size be changed? Where do DirectShow handle it? Thank you!
|
|
|
|
|
I am currently working on an AVI player for inclusion in a program I am working on, and am using the ActiveMovie4 directx control. However, I am having difficulty resizing the parent window to the movie size. When creating the original movie window, I set the rect at (0,0,500,500), but depending on the video opened, the window doesn't stay that size. The rect, though, seems to not change, because when I use a GetWindowRect() function, it is still set at (0,0,500,500). How can I get the right size?
Graham, Compass Systems
|
|
|
|
|
When you say "the" rect, which rect do you mean ? Could you post your code ? I think you are mistaking GetClientRect() with GetWindowRect() . One of both returns you the size of the window defined in the ressource editor, the other one the "present" size of your window. So if you´re not using the good one, the window size may actually change while running your app but you are still asking for the original size in the ressource editor which remains of course unchanged. See what I mean ?
~RaGE();
|
|
|
|
|
I am using GetWindowRect(), but I also tried get client rect, and this resulted in the window being moved outside the main window that was creating the dialog box that contained the ActiveMovie Control, and it still gave me the wrong rect. Thanks for your help though...Any other suggestions?
|
|
|
|
|
Just post your code, pls...
~RaGE();
|
|
|
|
|
here it is:
video->Create(0,"hi",WS_VISIBLE|WS_CHILD,CRect (0,0,500,500),this,10);
video->SetFileName(opendlg.GetFileName());
video->Run();
//Resize dialog box to hold the movie window
video->GetWindowRect(avidlg.newrect);
avidlg.MoveWindow(avidlg.newrect, TRUE);
avidlg.UpdateWindow();
|
|
|
|
|
To be honest, i do not see what´s wrong, sorry ... Ain´t it any MovieWindowSize() function like specified in MSDN ??
~RaGE();
|
|
|
|
|
Ah, thanks for your help anyway. We couldn't find anything wrong with it either. There is a MovieWindowSize() function, but it only takes a long as a parameter, 0 1 2 or 3. This doesn't seem to limit the size of the video to a point where I can get a decent resize factor. Anyway, thanks for giving it a shot. If you come up with anything else, let me know. Thanks.
|
|
|
|
|
Is it possible to draw a window directly on the memory dc as we are drawing on the screen.
|
|
|
|
|
Does anyone knows how to use FilgraphManager Object(directx object) in VC?
Thanks a lot.
No pains, no gains.
|
|
|
|
|
Hi,
I need to parse a small amount of code. The best way to do this is probably to create a parser but I don't like the idea of writing a parser from scratch. Besides, there are a number of parser generators out there which should be able to create a parser that does all I need.
But what parser generator should I use? I downloaded the spirit parser generator but haven't tried it out yet.
I'm using C++ but the code I have to parse is actually VBA. Not that it matters much - the code is not very complicated and uses only a small subset of the VB language.
Any comments would be appreciated.
With best regards,
Daniel
|
|
|
|
|
You could try Antlr..or (if you're more masochistic) Lex&Yacc or Flex&Bison. I've also used Visual Parse++ (that costs money, though), but I'd give Antlr the prize for most intuitive specification language - it also generates easy to understand & debug code, mainly because it generates a recursive descent parser rather than one based on an FSM.
Like you, I've downloaded Spirit, but not tried it out...
Stuart Dootson
'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'
|
|
|
|
|
I there something similar as flock() on Unix machines?
I'd like to get exclusive file access or shared read access. Thanks for help.
|
|
|
|
|
|
thanks.
How can I use them together with old libc/CRT funtions fopen() , flose() ? Or which would be the best functions to lock files when using fopen etc?
|
|
|
|
|
It would be better to use CreateFile and lock it by passing 0 as the share mode.
bibamus, edamus, cras moriemur [eat, drink, for tomorrow we die]
|
|
|
|
|
The problem is portability here.
Right now my core code works on Windows, Unix, whatever. I'd like to keep that, once you have it it's neat to have it. perhaps there is a workaround, to still work with fopen()?
|
|
|
|