|
A small addition to the suggestion by Superman.
Please include Windows.h as well.
|
|
|
|
|
|
Hi all,
I tried to make an matching between two strings the first is Pattern(" * weather * ") and the second is the user's input like User_str("how is the weather in London?"), so these two strings matched as follows:
the first star * = "how is the"
weather = "weather"
And the second star * = "in London?"
The function should return true if matched and false if not.
I know the idea of this function its an old but I have to build it from scratch(without using regular expressions) for unicode strings with these restrictions
the * if its attached to the text(ex. weather) should match zero or more characters.
the * if its not attached to the text (ex. weather) should match one or more characters.
the ? should match only one character whatever where it is.
If anybody have an idea please let me know because i had some trials but my function is not working properly.
Thanks alot
|
|
|
|
|
Have a look at this CP article[^].
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I saw this article but i thought if there are another way to solve the problem.
Thank you very much
|
|
|
|
|
Hi,
When will a register variable would be created in "C"?(during compile or
run time)
|
|
|
|
|
register is only hint to compiler! The compiler may ignore this. So, it will created during compile time.
Thanks and Regards,
Selvam,
http://www.wincpp.com
|
|
|
|
|
|
Thanks in advance..
How do the compiler know the availability of free registers at compile
time? It's practically soundless, when a stack frame is created at runtime
how could the register variable is defined at compile time?
|
|
|
|
|
madhu_v wrote: How do the compiler know the availability of free registers at compile
time?
Well, I believe that allocating registers is one of the task of a compiler...
Anyway, the register keyword is just an hint for the compiler.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Yes exactly
Величие не Бога может быть недооценена.
|
|
|
|
|
During Compile time...
Regards,
Rane
|
|
|
|
|
Thank you for all the reply....
|
|
|
|
|
when I execute my simple program that I have implmented
serialization with.
scenario:
I go about drawing a few shapes, which are added to my element list,
and then save the file, which it successfuly does
but a problem occurs when I select "new" or "open file":
The previous content is still shown on 'new' and also with a
the opened file:
So I have then added code to the mfc-document "onNewDocument()"
to delete all the elements in the list.
And I have also added the code to remove all the elements
as well to the virtual function I have added "OpenDocument" which also works fine.
My only problem know is, if I save a document,
and then do some extra drwaing, and then try to reload the
the last save, the current drawing I am doing, remains, and the saved document remains unseen.
Can anybody know why this implkmentation is not working,
my understanding that mfc serialzation automatcaly takes care
of these automatically
Thanks V much if you can help
Simon
|
|
|
|
|
simon alec smith wrote: element list
Display the declaration for this.
simon alec smith wrote: mfc serialzation automatcaly takes care
of these automatically
That depends, what does your implementation of CDocument::Serialize look like?
|
|
|
|
|
You may be approaching this wrong.
First, since you didn't say, I'm guessing that you have an SDI application. If that's the case, the document is never destroyed until the application exits.
When you choose "new" or "open" the framework calls the CDocument's DeleteContents() function. You need to override that and clean up any previous work or data you may have created - basically, return all values to the point they would be when you first open the application.
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
modified on Thursday, August 20, 2009 6:32 AM
|
|
|
|
|
thanks, what you said helps
Simon
|
|
|
|
|
Hey everyone!
I am currently working on a project that requires the capture of video from a video capture card. This video needs to be recorded for later analysis.
There are many different examples online, and a few here on CodeProject, but I would really like some advice. Which API or method is the best for video capture with the requirements below?
1. Ability to select from multiple devices. In this particular case, I need support for a TV capture card or a webcam.
2. Ability to preview video in realtime.
3. Ability to record the output to a file or series of files.
4. Has to be compatible with Visual C++.
Thanks for the help!
-Nathan
modified on Wednesday, August 19, 2009 2:49 PM
|
|
|
|
|
DirectX DirectShow is the answer your questions.You could use it to capture and configurate web cams,capture video from files,capture from TV tuners,capture network streams and etc.Microsoft Media Foundation which starts from Windows Vista as alternative of DirectX and Windows media SDK also could be useful.
Life is a stage and we are all actors!
|
|
|
|
|
Thank you for the quick response to my question! Yes, I've heard mention of DirectShow.
I have tried reading some of the DirectShow documentation, but I am not exactly sure where I should get started with the API. Do you have any suggestions of resources that I should read? The regular MSDN documentation seems a bit clunky to navigate, and I'm not exactly sure what my starting point should be.
|
|
|
|
|
There isn't many to many samples how to work with DirectShow in C++.The reason is that COM is not the favourite model for most of the developers.Here is nice sample how to capture single frame from web camera using C++.You could easy adapt it to your MFC app for example.I highly recommend to test your graphs with GraphEdit or GraphStudio or some similar graph configuration testing tool before you create them programatically.
Life is a stage and we are all actors!
modified on Wednesday, August 19, 2009 12:30 PM
|
|
|
|
|
Thank you, Hristo.
Those resources look good (much better than my searches were yielding). I will read up on them and I will attempt to test them within GraphEdit.
|
|
|
|
|
Always glad to help you.
There is plenty of articles at codeproject how to use DirectShow with .NET.I believe that code translation from .NET to C++ style shouldn't be difficult.
Regards!
Life is a stage and we are all actors!
|
|
|
|
|
last time i looked, there were a whole bunch of samples in the DirectShow SDK. i found them quite useful for what i had to do (frame grabbing).
|
|
|
|
|
As Hristo Bojilov's, so does my vote also go to DirectShow.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|